From: Gurucharan Shetty Date: Fri, 18 Apr 2014 18:04:14 +0000 (-0700) Subject: daemon-windows: Recognize --no-chdir option for windows. X-Git-Tag: sliver-openvswitch-2.2.90-1~3^2~91 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=fd9164cd5aa087e1acc671aad36d66b4ba267c34 daemon-windows: Recognize --no-chdir option for windows. The option won't have any effect on the running of the daemon. Recognizing the option lets us avoid if else conditions in unit tests. Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- diff --git a/lib/daemon.h b/lib/daemon.h index 0384b6400..a5f99d58f 100644 --- a/lib/daemon.h +++ b/lib/daemon.h @@ -80,6 +80,7 @@ pid_t read_pidfile(const char *name); #else #define DAEMON_OPTION_ENUMS \ OPT_DETACH, \ + OPT_NO_CHDIR, \ OPT_PIDFILE, \ OPT_PIPE_HANDLE, \ OPT_SERVICE, \ @@ -87,6 +88,7 @@ pid_t read_pidfile(const char *name); #define DAEMON_LONG_OPTIONS \ {"detach", no_argument, NULL, OPT_DETACH}, \ + {"no-chdir", no_argument, NULL, OPT_NO_CHDIR}, \ {"pidfile", optional_argument, NULL, OPT_PIDFILE}, \ {"pipe-handle", required_argument, NULL, OPT_PIPE_HANDLE}, \ {"service", no_argument, NULL, OPT_SERVICE}, \ @@ -96,6 +98,9 @@ pid_t read_pidfile(const char *name); case OPT_DETACH: \ break; \ \ + case OPT_NO_CHDIR: \ + break; \ + \ case OPT_PIDFILE: \ set_pidfile(optarg); \ break; \