-#define DAEMON_LONG_OPTIONS \
- {"detach", no_argument, 0, 'D'}, \
- {"force", no_argument, 0, 'f'}, \
- {"pidfile", optional_argument, 0, 'P'}
+enum {
+ OPT_DETACH = UCHAR_MAX + 2048,
+ OPT_NO_CHDIR,
+ OPT_OVERWRITE_PIDFILE,
+ 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}