daemonize.h File Reference

Functions for daemonizing on various platforms. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int daemonize (int *own_pgid)
 daemon init
int do_suid (const int uid, const int gid)
 set daemon user and group id
int increase_open_fds (unsigned int target)
 try to increase the open file limit
int set_core_dump (int enable, unsigned int size)
 enable or disable core dumps


Detailed Description

Functions for daemonizing on various platforms.

Definition in file daemonize.h.


Function Documentation

int daemonize ( int *  own_pgid  ) 

daemon init

Parameters:
own_pgid daemon process group
Returns:
return 0 on success, -1 on error

Definition at line 63 of file daemonize.c.

References chroot_dir, disable_core_dump, LM_CRIT, LM_ERR, LM_WARN, log_stderr, NULL, pgid_file, pid, pid_file, and working_dir.

Referenced by main().

int do_suid ( const int  uid,
const int  gid 
)

set daemon user and group id

Parameters:
uid user id
gid group id
Returns:
return 0 on success, -1 on error

Definition at line 223 of file daemonize.c.

References disable_core_dump, LM_CRIT, and LM_ERR.

Referenced by main_loop().

int increase_open_fds ( unsigned int  target  ) 

try to increase the open file limit

Parameters:
target target that should be reached
Returns:
return 0 on success, -1 on error

Definition at line 258 of file daemonize.c.

References LM_CRIT, LM_DBG, and LM_INFO.

Referenced by main().

int set_core_dump ( int  enable,
unsigned int  size 
)

enable or disable core dumps

Parameters:
enable set to 1 to enable, to 0 to disable
size core dump size
Returns:
return 0 on success, -1 on error

Definition at line 316 of file daemonize.c.

References LM_CRIT, and LM_DBG.

Referenced by main().


Generated on Mon May 21 18:00:38 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6