logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

dexec.h - Contains a robust API for running sub processes with STDOUT and STDERR redirected to syslog.

Author

Generated automatically by Doxygen for libdaemon from the source code. libdaemon Version 0.14 dexec.h(3)

Detailed Description

Contains a robust API for running sub processes with STDOUT and STDERR redirected to syslog. Definition in file dexec.h.

Function Documentation

intdaemon_exec(constchar*dir,int*ret,constchar*prog,...) Run the specified executable with the specified arguments in the specified directory and return the return value of the program in the specified pointer. The calling process is blocked until the child finishes and all child output (either STDOUT or STDIN) has been written to syslog. Running this function requires that daemon_signal() has been called with SIGCHLD as argument. Parametersdir Working directory for the process. ret A pointer to an integer to write the return value of the program to. prog The path to the executable ... The arguments to be passed to the program, followed by a (char *) NULL Returns Nonzero on failure, zero on success Since 0.4 SeealsoDAEMON_EXEC_AVAILABLEExamplestestd.c. intdaemon_execv(constchar*dir,int*ret,constchar*prog,va_listap) The same as daemon_exec, but without variadic arguments. Since 0.11 SeealsoDAEMON_EXECV_AVAILABLE

Macro Definition Documentation

#defineDAEMON_EXEC_AVAILABLE1 This variable is defined to 1 iff daemon_exec() is supported. Since 0.4 Seealsodaemon_exec() Definition at line 39 of file dexec.h. #defineDAEMON_EXECV_AVAILABLE1 This variable is defined to 1 iff daemon_execv() is supported. Since 0.11 Seealsodaemon_execv() Definition at line 68 of file dexec.h. #defineDAEMON_GCC_SENTINEL A macro for making use of GCCs printf compilation warnings. Definition at line 45 of file dexec.h.

Name

dexec.h - Contains a robust API for running sub processes with STDOUT and STDERR redirected to syslog.

Synopsis

#include <stdarg.h> Macros #define DAEMON_EXEC_AVAILABLE 1 This variable is defined to 1 iff daemon_exec() is supported. #define DAEMON_GCC_SENTINEL A macro for making use of GCCs printf compilation warnings. #define DAEMON_EXECV_AVAILABLE 1 This variable is defined to 1 iff daemon_execv() is supported. Functions int daemon_exec (const char *dir, int *ret, const char *prog,...) DAEMON_GCC_SENTINEL Run the specified executable with the specified arguments in the specified directory and return the return value of the program in the specified pointer. int daemon_execv (const char *dir, int *ret, const char *prog, va_list ap) The same as daemon_exec, but without variadic arguments.

See Also