dfork.h

Go to the documentation of this file.
00001 #ifndef foodaemonforkhfoo
00002 #define foodaemonforkhfoo
00003 
00004 /***
00005   This file is part of libdaemon.
00006 
00007   Copyright 2003-2008 Lennart Poettering
00008 
00009   libdaemon is free software; you can redistribute it and/or modify
00010   it under the terms of the GNU Lesser General Public License as
00011   published by the Free Software Foundation, either version 2.1 of the
00012   License, or (at your option) any later version.
00013 
00014   libdaemon is distributed in the hope that it will be useful, but
00015   WITHOUT ANY WARRANTY; without even the implied warranty of
00016   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00017   Lesser General Public License for more details.
00018 
00019   You should have received a copy of the GNU Lesser General Public
00020   License along with libdaemon. If not, see
00021   <http://www.gnu.org/licenses/>.
00022 ***/
00023 
00024 #include <sys/types.h>
00025 
00026 #ifdef __cplusplus
00027 extern "C" {
00028 #endif
00029 
00063 pid_t daemon_fork(void);
00064 
00071 int daemon_retval_init(void);
00072 
00080 void daemon_retval_done(void);
00081 
00091 int daemon_retval_wait(int timeout);
00092 
00100 int daemon_retval_send(int s);
00101 
00103 #define DAEMON_CLOSE_ALL_AVAILABLE 1
00104 
00107 int daemon_close_all(int except_fd, ...);
00108 
00111 int daemon_close_allv(const int except_fds[]);
00112 
00114 #define DAEMON_UNBLOCK_SIGS_AVAILABLE 1
00115 
00118 int daemon_unblock_sigs(int except, ...);
00119 
00122 int daemon_unblock_sigsv(const int except[]);
00123 
00125 #define DAEMON_RESET_SIGS_AVAILABLE 1
00126 
00129 int daemon_reset_sigs(int except, ...);
00130 
00133 int daemon_reset_sigsv(const int except[]);
00134 
00135 #ifdef __cplusplus
00136 }
00137 #endif
00138 
00139 #endif

Generated on Fri Mar 27 11:41:26 2009 for libdaemon by  doxygen 1.5.1