dexec.h(3)
π dexec.h β NAME π
dexec.h β bestie, it's a whole header file that contains a robust API for running sub processes with STDOUT and STDERR redirected to syslog. no cap. π¦
β¨ SYNOPSIS β¨
#include <stdarg.h>
π Macros
#define DAEMON_EXEC_AVAILABLE 1β this variable is defined to1iffdaemon_exec()is supported. literally a little green flag telling you the function showed up. π#define DAEMON_GCC_SENTINELβ a macro for making use of GCC's printf compilation warnings. it's giving "the compiler is watching, be nice". π#define DAEMON_EXECV_AVAILABLE 1β this variable is defined to1iffdaemon_execv()is supported. same energy, different function. πΈ
π§ 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. iconic behavior fr fr.
int daemon_execv (const char *dir, int *ret, const char *prog, va_list ap)
the same as daemon_exec, but without variadic arguments. lowkey the introvert version. π
π Detailed Description
contains a robust API for running sub processes with STDOUT and STDERR redirected to syslog.
definition in file dexec.h.
π Macro Definition Documentation
#define DAEMON_EXEC_AVAILABLE 1
this variable is defined to 1 iff daemon_exec() is supported.
Since: 0.4
See also: daemon_exec()
definition at line 39 of file dexec.h.
#define DAEMON_EXECV_AVAILABLE 1
this variable is defined to 1 iff daemon_execv() is supported.
Since: 0.11
See also: daemon_execv()
definition at line 68 of file dexec.h.
#define DAEMON_GCC_SENTINEL
a macro for making use of GCC's printf compilation warnings.
definition at line 45 of file dexec.h.
β Function Documentation
int daemon_exec (const char * dir, int * ret, const char * 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.
okay bestie this is the important part β nodaemon_signal()withSIGCHLDmeans nodaemon_exec(). it's a whole prerequisite, not a suggestion. π«Ά
Parameters
dirβ 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. (yes, it's that classic backwards-feeling thing, we love it here π)
Since: 0.4
See also: DAEMON_EXEC_AVAILABLE
Examples: testd.c.
int daemon_execv (const char * dir, int * ret, const char * prog, va_list ap)
the same as daemon_exec, but without variadic arguments.
Since: 0.11
See also: DAEMON_EXECV_AVAILABLE
π Author
generated automatically by Doxygen for libdaemon from the source code. (not a human, just a little robot doing its thing, and honestly? slay. π€β¨)
and that's the whole page, bestie β this was libdaemon, Version 0.14, dated dexec.h(3). periodt. π
ππ¦
π¦ where this page comes from
- ubuntu noble: libdaemon-doc 0.14-7.1ubuntu4
- ubuntu questing: libdaemon-doc 0.14-7.1ubuntu4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms