00001 #ifndef foodaemonpidhfoo 00002 #define foodaemonpidhfoo 00003 00004 /* 00005 * This file is part of libdaemon. 00006 * 00007 * libdaemon is free software; you can redistribute it and/or modify it 00008 * under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * libdaemon is distributed in the hope that it will be useful, but 00013 * WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with libdaemon; if not, write to the Free Software Foundation, 00019 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 00020 */ 00021 00022 #include <sys/types.h> 00023 00031 typedef const char* (*daemon_pid_file_proc_t)(void); 00032 00038 extern const char *daemon_pid_file_ident; 00039 00044 extern daemon_pid_file_proc_t daemon_pid_file_proc; 00045 00050 const char *daemon_pid_file_proc_default(void); 00051 00055 int daemon_pid_file_create(void); 00056 00060 int daemon_pid_file_remove(void); 00061 00065 pid_t daemon_pid_file_is_running(void); 00066 00071 int daemon_pid_file_kill(int s); 00072 00074 #define DAEMON_PID_FILE_KILL_WAIT_AVAILABLE 1 00075 00085 int daemon_pid_file_kill_wait(int s, int m); 00086 00087 #endif