Main Page | Modules | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

Miscellaneous Utilities


Functions

int alp_daemon_start (int nochdir, int noclose)
 Spawn a child process to separate execution from boot script, similar to daemon().
int alp_daemon_release (int status)
 Used after alp_daemon_start() to allow the boot sequence to continue.


Function Documentation

int alp_daemon_release int  status  ) 
 

Used after alp_daemon_start() to allow the boot sequence to continue.

This API is used by system services during boot, in conjunction with alp_daemon_start(). This call is made by the child process after the parent calls alp_daemon_start, and will cause the parent to exit with the indicated status, allowing the boot sequence to continue. See documentation for alp_daemon_start() for more information.

Parameters:
[in] status The status code which should be passe dby the parent to exit().
Returns:
Yields 0 on success.

int alp_daemon_start int  nochdir,
int  noclose
 

Spawn a child process to separate execution from boot script, similar to daemon().

This API is used by system services during boot. The proper way for a system service to be started from alp_init.sh is for it to be run as an executable in foreground mode (without an '&'). The service then calls alp_daemon_start() to fork a child process, completes initialization there, and calls alp_daemon_release() to cause the parent process to exit so the boot sequence can continue. This procedure ensures that system services are always brought up synchronously and in a consistent manner.

Parameters:
[in] nochdir Pass non-zero to prevent the current working directory from being set to "/".
[in] noclose Pass non-zero to prevent stdin, stdout, and stderr from being redirected to /dev/null.
Returns:
Yields 0 in the child process on success. Does not return in the parent process.


Generated on Sat Dec 16 20:29:50 2006 for hiker-0.9 by  doxygen 1.4.4