fixes, fully translated tomato, with english dictionary and Polish translation
[tomato.git] / release / src / router / miniupnpd / daemonize.h
blobb2626d51df89598dc054a0de05849933d7157a8a
1 /* $Id: daemonize.h,v 1.6 2008/01/29 13:04:46 nanard Exp $ */
2 /* MiniUPnP project
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__
9 #define __DAEMONIZE_H__
11 #include "config.h"
13 #ifndef USE_DAEMON
14 /* daemonize()
15 * "fork" to background, detach from terminal, etc...
16 * returns: pid of the daemon, exits upon failure */
17 int
18 daemonize(void);
19 #endif
21 /* writepidfile()
22 * write the pid to a file */
23 int
24 writepidfile(const char * fname, int pid);
26 /* checkforrunning()
27 * check for another instance running
28 * returns: 0 only instance
29 * -1 invalid filename
30 * -2 another instance running */
31 int
32 checkforrunning(const char * fname);
34 #endif