xorp

daemon.h

00001 /* -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*- */
00002 /* vim:set sts=4 ts=8: */
00003 
00004 /*
00005  * Copyright (c) 2001-2011 XORP, Inc and Others
00006  *
00007  * This program is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU Lesser General Public License, Version
00009  * 2.1, June 1999 as published by the Free Software Foundation.
00010  * Redistribution and/or modification of this program under the terms of
00011  * any other version of the GNU Lesser General Public License is not
00012  * permitted.
00013  * 
00014  * This program 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. For more details,
00017  * see the GNU Lesser General Public License, Version 2.1, a copy of
00018  * which can be found in the XORP LICENSE.lgpl file.
00019  * 
00020  * XORP, Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
00021  * http://xorp.net
00022  */
00023 
00024 #ifndef __LIBXORP_DAEMON_H__
00025 #define __LIBXORP_DAEMON_H__
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00031 #ifndef _PATH_DEVNULL
00032 #define _PATH_DEVNULL "/dev/null"
00033 #endif
00034 
00038 enum {
00039     DAEMON_CHDIR = 0,
00040     DAEMON_NOCHDIR = 1,
00041     DAEMON_CLOSE = 0,
00042     DAEMON_NOCLOSE = 1
00043 } xorp_daemon_t;
00044 
00062 int xorp_daemonize(int nochdir, int noclose);
00063 
00064 #ifdef __cplusplus
00065 }
00066 #endif
00067 
00068 #endif /* __LIBXORP_DAEMON_H__ */
 All Classes Namespaces Functions Variables Typedefs Enumerations