1 /* $Id: daemonize.h,v 1.8 2012/09/27 16:00:44 nanard Exp $ */
3 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
4 * (c) 2006 Thomas Bernard
5 * This software is subject to the conditions detailed
6 * in the LICENCE file provided within the distribution */
8 #ifndef DAEMONIZE_H_INCLUDED
9 #define DAEMONIZE_H_INCLUDED
15 * "fork" to background, detach from terminal, etc...
16 * returns: pid of the daemon, exits upon failure */
22 * write the pid to a file */
24 writepidfile(const char * fname
, int pid
);
27 * check for another instance running
28 * returns: 0 only instance
30 * -2 another instance running */
32 checkforrunning(const char * fname
);