![]() |
![]() |
![]() |
Run a process in the background
#include <sys/procmgr.h> int procmgr_daemon( int status, unsigned flags );
libc
The function procmgr_daemon() function lets programs detach themselves from the controlling terminal and run in the background as system daemons. This also puts the caller into session 1. The argument status is returned to the parent process as if exit() were called; the returned value is normally EXIT_SUCCESS.
Flags currently defined (in <sys/procmgr.h>) are:
A nonnegative integer, or -1 if an error occurs.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
![]() |
![]() |
![]() |