• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • Directories
  • File List
  • Globals

daemonize.h

00001 /*
00002  * $Id$
00003  *
00004  * Copyright (C) 2001-2003 FhG Fokus
00005  *
00006  * Permission to use, copy, modify, and distribute this software for any
00007  * purpose with or without fee is hereby granted, provided that the above
00008  * copyright notice and this permission notice appear in all copies.
00009  *
00010  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
00011  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
00012  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
00013  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
00014  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00015  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
00016  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
00017  */
00018 /*
00019  * 
00020  * History:
00021  * --------
00022  *  2004-02-20  created by andrei
00023  *  2007-06-07  added mem_lock_pages() (andrei)
00024  *  2010-08-19  send status via pipe code derived from 9167c1 (ibc) (andrei)
00025  */
00026 
00027 #ifndef _daemonize_h
00028 #define _daemonize_h
00029 
00030 int daemonize(char* name, int daemon_status_fd_input);
00031 int do_suid(void);
00032 int increase_open_fds(int target);
00033 int set_core_dump(int enable, long unsigned int size);
00034 int mem_lock_pages(void);
00035 int set_rt_prio(int prio, int policy);
00036 
00037 void daemon_status_init(void);
00038 void daemon_status_on_fork_cleanup(void);
00039 int daemon_status_send(char status);
00040 void daemon_status_no_wait(void);
00041 void daemon_status_on_fork_cleanup(void);
00042 
00043 #endif /*_daemonize_h */
00044 
00045 /* vi: set ts=4 sw=4 tw=79:ai:cindent: */

Generated on Tue May 22 2012 13:10:05 for SIP Router by  doxygen 1.7.1