daemonize man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



DAEMONIZE(3)							  DAEMONIZE(3)

NAME
     _daemonize - make a process into a daemon

SYNOPSIS
     #include <unistd.h>

     int _daemonize(int flags, int fd1, int fd2, int fd3);

DESCRIPTION
     The _daemonize function does the common work needed ``to put a function
     into the background,'' or to make it into a ``daemon.''  That generally
     includes forking a new process, closing most files, and releasing the
     controlling tty.

     If flags & _DF_NOFORK is 0, then a new process in a new session is
     started.  Debugging is often easier with flags set to contain _DF_NOFORK.

     If flags & _DF_NOCHDIR is 0, then the current working directory is
     changed to /.  Otherwise, the current working directory is unchanged.

     If flags & _DF_NOCLOSE is 0, then all file descriptors except fd1, fd2,
     and fd3 are closed.  Because _daemonize closes all file descriptors,
     closelog() is called to stop logging cleanly.  The fd# arguments should
     be -1 if they are not file descriptors to be left open.

SEE ALSO
     close(2), chdir(2), fork(2), getdtablesize(2), syslog(3B), setsid(2),
     tty(1), tty(7)

DIAGNOSTICS
     The returned value -1 indicates that one of the necessary system calls
     failed.

									Page 1

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net