mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
Standardized routines for forking processes (keeps all the specialized code in one place).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -480,6 +480,15 @@ int ast_record_review(struct ast_channel *chan, const char *playfile, const char
|
||||
/*! \brief Decode an encoded control or extended ASCII character */
|
||||
int ast_get_encoded_char(const char *stream, char *result, size_t *consumed);
|
||||
|
||||
/*! \brief Common routine for child processes, to close all fds prior to exec(2) */
|
||||
void ast_close_fds_above_n(int n);
|
||||
|
||||
/*! \brief Common routine to safely fork without a chance of a signal handler firing badly in the child */
|
||||
int ast_safe_fork(int stop_reaper);
|
||||
|
||||
/*! \brief Common routine to cleanup after fork'ed process is complete (if reaping was stopped) */
|
||||
void ast_safe_fork_cleanup(void);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -78,6 +78,9 @@ void ast_queue_log(const char *queuename, const char *callid, const char *agent,
|
||||
void ast_verbose(const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
void ast_child_verbose(int level, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
|
||||
int ast_register_verbose(void (*verboser)(const char *string));
|
||||
int ast_unregister_verbose(void (*verboser)(const char *string));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user