X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fdaemon.h;h=1b4f988e3fbe627be1a55d5ad4bf9dfb1e7a7969;hb=2a529ead2a3a3a6367896834ef2024ea1a6dd396;hp=4af98f624b193f97189981cfd491c19a1627d400;hpb=00c08589876b7c1cd8f57e5ebb3e66bb164c5a3d;p=openvswitch diff --git a/lib/daemon.h b/lib/daemon.h index 4af98f62..1b4f988e 100644 --- a/lib/daemon.h +++ b/lib/daemon.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks. + * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,12 +28,12 @@ OPT_PIDFILE, \ OPT_MONITOR -#define DAEMON_LONG_OPTIONS \ - {"detach", no_argument, 0, OPT_DETACH}, \ - {"no-chdir", no_argument, 0, OPT_NO_CHDIR}, \ - {"pidfile", optional_argument, 0, OPT_PIDFILE}, \ - {"overwrite-pidfile", no_argument, 0, OPT_OVERWRITE_PIDFILE},\ - {"monitor", no_argument, 0, OPT_MONITOR} +#define DAEMON_LONG_OPTIONS \ + {"detach", no_argument, NULL, OPT_DETACH}, \ + {"no-chdir", no_argument, NULL, OPT_NO_CHDIR}, \ + {"pidfile", optional_argument, NULL, OPT_PIDFILE}, \ + {"overwrite-pidfile", no_argument, NULL, OPT_OVERWRITE_PIDFILE}, \ + {"monitor", no_argument, NULL, OPT_MONITOR} #define DAEMON_OPTION_HANDLERS \ case OPT_DETACH: \ @@ -64,6 +64,7 @@ bool is_chdir_enabled(void); void set_detach(void); bool get_detach(void); void daemon_set_monitor(void); +void daemon_save_fd(int fd); void daemonize(void); void daemonize_start(void); void daemonize_complete(void);