/***************************************************************************** POPular -- A POP3 server and proxy for large mail systems $Id: daemon.h,v 1.5 2002/09/15 12:27:16 sqrt Exp $ http://www.remote.org/jochen/mail/popular/ ****************************************************************************** Copyright (C) 1999-2002 Jochen Topf This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA *****************************************************************************/ #ifndef _POPULAR_DAEMON_H #define _POPULAR_DAEMON_H void daemonize(const char *prg); void decrease_priority(); int set_keepalive(int socket); void *prepare_statefile(const char *dir, const char *templ, const char *link, int size, int *ofd); void write_pidfile(const char *dir, const char *templ, const char *link); int open_ctrl_socket(const char *dir, const char *templ, const char *link, mode_t umask); void unlink_in_rundir(const char *dir, const char *templ, const char *link); int load_ok(int maxload); int sess_ok(int used, int max, const char *dir, const char *file); void reapchildren(void (*freesess)(pid_t)); #endif /* _POPULAR_DAEMON_H */ /** THE END *****************************************************************/