#include "daemon-private.h"
#include <stdio.h>
#include <stdlib.h>
+#include "dirs.h"
+#include "ovs-thread.h"
#include "poll-loop.h"
-#include "vlog.h"
+#include "openvswitch/vlog.h"
VLOG_DEFINE_THIS_MODULE(daemon_windows);
VLOG_FATAL("Failed to create a event (%s).", msg_buf);
}
- poll_fd_wait_event(0, wevent, POLLIN);
+ poll_wevent_wait(wevent);
/* Register the control handler. This function is called by the service
* manager to stop the service. */
if (service_status.dwCurrentState != SERVICE_RUNNING) {
return true;
} else {
- poll_fd_wait_event(0, wevent, POLLIN);
+ poll_wevent_wait(wevent);
}
}
return false;
/* Don't close the pidfile till the process exits. */
}
-void daemonize_start(void)
+void
+daemonize_start(bool access_datapath OVS_UNUSED)
{
if (pidfile) {
make_pidfile();
service_complete();
}
+void
+daemon_become_new_user(bool access_datapath OVS_UNUSED)
+{
+}
+
/* Returns the file name that would be used for a pidfile if 'name' were
* provided to set_pidfile(). The caller must free the returned string. */
char *
make_pidfile_name(const char *name)
{
if (name && strchr(name, ':')) {
- return strdup(name);
+ return xstrdup(name);
} else {
return xasprintf("%s/%s.pid", ovs_rundir(), program_name);
}
}
+
+void
+daemon_set_new_user(const char *user_spec OVS_UNUSED)
+{
+ VLOG_FATAL("--user options is not currently supported.");
+}