daemonize.h
c03cc017
 /*
  * $Id$
  *
53c7e0f1
  * Copyright (C) 2001-2003 FhG Fokus
c03cc017
  *
83e91df1
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * copyright notice and this permission notice appear in all copies.
c03cc017
  *
83e91df1
  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
c03cc017
  */
 /*
  * 
  * History:
  * --------
  *  2004-02-20  created by andrei
83e91df1
  *  2007-06-07  added mem_lock_pages() (andrei)
  *  2010-08-19  send status via pipe code derived from 9167c1 (ibc) (andrei)
c03cc017
  */
 
 #ifndef _daemonize_h
 #define _daemonize_h
 
9167c186
 int daemonize(char* name, int daemon_status_fd_input);
abb01fb4
 int do_suid(void);
385c63eb
 int increase_open_fds(int target);
f4136d77
 int set_core_dump(int enable, long unsigned int size);
abb01fb4
 int mem_lock_pages(void);
71a0a583
 int set_rt_prio(int prio, int policy);
c03cc017
 
abb01fb4
 void daemon_status_init(void);
 void daemon_status_on_fork_cleanup(void);
83e91df1
 int daemon_status_send(char status);
abb01fb4
 void daemon_status_no_wait(void);
 void daemon_status_on_fork_cleanup(void);
83e91df1
 
 #endif /*_daemonize_h */
c03cc017
 
83e91df1
 /* vi: set ts=4 sw=4 tw=79:ai:cindent: */