As of now, we are using the process subsystem in
ovsdb-server to handle the "--run" command line
option. That particular option is not used often
and till deemed necessary, make it unsupported on
Windows platform.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
void
process_init(void)
{
void
process_init(void)
{
static bool inited;
struct sigaction sa;
static bool inited;
struct sigaction sa;
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_NOCLDSTOP | SA_RESTART;
xsigaction(SIGCHLD, &sa, NULL);
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_NOCLDSTOP | SA_RESTART;
xsigaction(SIGCHLD, &sa, NULL);
int
process_start(char **argv, struct process **pp)
{
int
process_start(char **argv, struct process **pp)
{
argv[0], ovs_strerror(errno));
_exit(1);
}
argv[0], ovs_strerror(errno));
_exit(1);
}
+#else
+ *pp = NULL;
+ return ENOSYS;
+#endif
}
/* Destroys process 'p'. */
}
/* Destroys process 'p'. */
int
process_kill(const struct process *p, int signr)
{
int
process_kill(const struct process *p, int signr)
{
return (p->exited ? ESRCH
: !kill(p->pid, signr) ? 0
: errno);
return (p->exited ? ESRCH
: !kill(p->pid, signr) ? 0
: errno);
+#else
+ return ENOSYS;
+#endif
}
/* Returns the pid of process 'p'. */
}
/* Returns the pid of process 'p'. */
process_status_msg(int status)
{
struct ds ds = DS_EMPTY_INITIALIZER;
process_status_msg(int status)
{
struct ds ds = DS_EMPTY_INITIALIZER;
if (WIFEXITED(status)) {
ds_put_format(&ds, "exit status %d", WEXITSTATUS(status));
} else if (WIFSIGNALED(status)) {
if (WIFEXITED(status)) {
ds_put_format(&ds, "exit status %d", WEXITSTATUS(status));
} else if (WIFSIGNALED(status)) {
if (WCOREDUMP(status)) {
ds_put_cstr(&ds, ", core dumped");
}
if (WCOREDUMP(status)) {
ds_put_cstr(&ds, ", core dumped");
}
+#else
+ ds_put_cstr(&ds, "function not supported.");
+#endif
char buf[_POSIX_PIPE_BUF];
if (!list_is_empty(&all_processes) && read(fds[0], buf, sizeof buf) > 0) {
char buf[_POSIX_PIPE_BUF];
if (!list_is_empty(&all_processes) && read(fds[0], buf, sizeof buf) > 0) {
void
process_wait(struct process *p)
{
void
process_wait(struct process *p)
{
if (p->exited) {
poll_immediate_wake();
} else {
poll_fd_wait(fds[0], POLLIN);
}
if (p->exited) {
poll_immediate_wake();
} else {
poll_fd_wait(fds[0], POLLIN);
}
+#else
+ OVS_NOT_REACHED();
+#endif
This option can be useful where a database server is needed only to
run a single command, e.g.:
.B "ovsdb\-server \-\-remote=punix:socket \-\-run='ovsdb\-client dump unix:socket Open_vSwitch'"
This option can be useful where a database server is needed only to
run a single command, e.g.:
.B "ovsdb\-server \-\-remote=punix:socket \-\-run='ovsdb\-client dump unix:socket Open_vSwitch'"
+.IP
+This option is not supported on Windows platform.
.SS "Daemon Options"
.ds DD \
\fBovsdb\-server\fR detaches only after it starts listening on all \
.SS "Daemon Options"
.ds DD \
\fBovsdb\-server\fR detaches only after it starts listening on all \
static const struct option long_options[] = {
{"remote", required_argument, NULL, OPT_REMOTE},
{"unixctl", required_argument, NULL, OPT_UNIXCTL},
static const struct option long_options[] = {
{"remote", required_argument, NULL, OPT_REMOTE},
{"unixctl", required_argument, NULL, OPT_UNIXCTL},
{"run", required_argument, NULL, OPT_RUN},
{"run", required_argument, NULL, OPT_RUN},
{"help", no_argument, NULL, 'h'},
{"version", no_argument, NULL, 'V'},
DAEMON_LONG_OPTIONS,
{"help", no_argument, NULL, 'h'},
{"version", no_argument, NULL, 'V'},
DAEMON_LONG_OPTIONS,