Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/p/procmgr_daemon.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/p/procmgr_daemon.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/p/procmgr_daemon.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/p/procmgr_daemon.html on line 8

procmgr_daemon()

Run a process in the background

Synopsis:

#include <sys/procmgr.h>

int procmgr_daemon( int status,
                    unsigned flags );

Arguments:

status
The status that you want to return to the parent process.
flags
The flags currently defined (in <sys/procmgr.h>) are:

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

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.


Note: The data in the siginfo_t structure for the SIGCHLD signal that the parent receives isn't useful in this case.

Returns:

A nonnegative integer, or -1 if an error occurs.

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

daemon(), exit(), procmgr_event_notify(), procmgr_event_trigger(), procmgr_guardian(), procmgr_session()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/p/procmgr_daemon.html on line 175

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/p/procmgr_daemon.html on line 175