Go to the source code of this file.
|
| int | main_rehash (ctx_t *ctx_p) |
| |
| int | main_status_update (ctx_t *ctx_p) |
| |
| int | ctx_set (ctx_t *ctx_p, const char *const parameter_name, const char *const parameter_value) |
| |
| int | config_block_parse (ctx_t *ctx_p, const char *const config_block_name) |
| |
| int | rules_count (ctx_t *ctx_p) |
| |
| char * | parameter_expand (ctx_t *ctx_p, char *arg, int exceptionflags, int *macros_count_p, int *expand_count_p, const char *(*parameter_get)(const char *variable_name, void *arg), void *parameter_get_arg) |
| | Expands option values, e. g. "/var/log/clsync-%label%.pid" -> "/var/log/clsync-clone.pid". More...
|
| |
| pid_t | fork_helper () |
| |
| int | parent_isalive () |
| |
| int | sethandler_sigchld (void(*handler)()) |
| |
| pid_t | waitpid_timed (pid_t child_pid, int *status_p, long sec, long nsec) |
| |
◆ exit_on
| #define exit_on |
( |
|
cond | ) |
{ debug(30, "exit_on: checking: %s", TOSTR(cond)); if (unlikely(cond)) { debug(1, "Exiting due to: "TOSTR(cond)); exit(0); } } |
◆ PEF_LAZY_SUBSTITUTION
| #define PEF_LAZY_SUBSTITUTION 4 |
◆ PEF_NONE
◆ PEF_UNEXPECTED_END
| #define PEF_UNEXPECTED_END 1 |
◆ PEF_UNSET_VARIABLE
| #define PEF_UNSET_VARIABLE 2 |
◆ config_block_parse()
| int config_block_parse |
( |
ctx_t * |
ctx_p, |
|
|
const char *const |
config_block_name |
|
) |
| |
◆ ctx_set()
| int ctx_set |
( |
ctx_t * |
ctx_p, |
|
|
const char *const |
parameter_name, |
|
|
const char *const |
parameter_value |
|
) |
| |
◆ fork_helper()
◆ main_rehash()
| int main_rehash |
( |
ctx_t * |
ctx_p | ) |
|
◆ main_status_update()
| int main_status_update |
( |
ctx_t * |
ctx_p | ) |
|
◆ parameter_expand()
| char* parameter_expand |
( |
ctx_t * |
ctx_p, |
|
|
char * |
arg, |
|
|
int |
exceptionflags, |
|
|
int * |
macro_count_p, |
|
|
int * |
expand_count_p, |
|
|
const char *(*)(const char *variable_name, void *arg) |
parameter_get, |
|
|
void * |
parameter_get_arg |
|
) |
| |
Expands option values, e. g. "/var/log/clsync-%label%.pid" -> "/var/log/clsync-clone.pid".
- Parameters
-
| [in] | ctx_p | Context |
| [in] | arg | An allocated string with unexpanded value. Will be free'd |
| [in] | exceptionflags | A bit field of allowed exceptions during parameter expansion:
- PEF_NONE No exceptions are allowed
- PEF_UNEXPECTED_END Do not warn about unexpected end of macro-substitution
- PEF_UNSET_VARIABLE Do not warn about unset variable
- PEF_LAZY_SUBSTITUTION Perform lazy substitution preserving original value
|
| [out] | macro_count_p | A pointer to count of found macro-s |
| [out] | expand_count_p | A pointer to count of expanded macro-s |
| [in] | parameter_get | A function to resolve macro-s |
| [in] | parameter_get_arg | An argument to the function |
- Return values
-
| char | * Pointer to newly allocated string, if successful |
| NULL | On error |
Definition at line 693 of file main.c.
◆ parent_isalive()
◆ rules_count()
| int rules_count |
( |
ctx_t * |
ctx_p | ) |
|
◆ sethandler_sigchld()
| int sethandler_sigchld |
( |
void(*)() |
handler | ) |
|
◆ waitpid_timed()
| pid_t waitpid_timed |
( |
pid_t |
child_pid, |
|
|
int * |
status_p, |
|
|
long |
sec, |
|
|
long |
nsec |
|
) |
| |
◆ argc
◆ argv
◆ ncpus
◆ parent_pid