how to use this function:procmgr_daemon

the function prototype is:
int procmgr_daemon( int status,
unsigned flags );

how to set status and glags?

please give me a example.

thanks for your help

from the docs for procmgr_daemon():

================

Arguments:

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

    * PROCMGR_DAEMON_NOCHDIR -- unless this flag is set, procmgr_daemon() changes the current working directory to the root "/".
    * PROCMGR_DAEMON_NOCLOSE -- unless this flag is set, procmgr_daemon() closes all file descriptors other than standard input, standard output and standard error.
    * PROCMGR_DAEMON_NODEVNULL -- unless this flag is set, procmgr_daemon() redirects standard input, standard output and standard error to /dev/null.
    * PROCMGR_DAEMON_KEEPUMASK -- unless this flag is set, procmgr_daemon() sets the umask to 0 (zero).

i have know this from qnx help.
but i can’t print message to /dev/null.
why?