poll_fd_wait_event(signal_fds[0], wevent, POLLIN);
}
+void
+fatal_ignore_sigpipe(void)
+{
+#ifndef _WIN32
+ signal(SIGPIPE, SIG_IGN);
+#endif
+}
+
static void
atexit_handler(void)
{
void fatal_signal_fork(void);
void fatal_signal_run(void);
void fatal_signal_wait(void);
+void fatal_ignore_sigpipe(void);
/* Convenience functions for unlinking files upon termination.
*
#include "daemon.h"
#include "dirs.h"
#include "dynamic-string.h"
+#include "fatal-signal.h"
#include "json.h"
#include "jsonrpc.h"
#include "lib/table.h"
proctitle_init(argc, argv);
set_program_name(argv[0]);
parse_options(argc, argv);
- signal(SIGPIPE, SIG_IGN);
+ fatal_ignore_sigpipe();
if (optind >= argc) {
ovs_fatal(0, "missing command name; use --help for help");
#include "dirs.h"
#include "dummy.h"
#include "dynamic-string.h"
+#include "fatal-signal.h"
#include "file.h"
#include "hash.h"
#include "json.h"
proctitle_init(argc, argv);
set_program_name(argv[0]);
service_start(&argc, &argv);
- signal(SIGPIPE, SIG_IGN);
+ fatal_ignore_sigpipe();
process_init();
parse_options(&argc, &argv, &remotes, &unixctl_path, &run_command);
#include "compiler.h"
#include "dirs.h"
#include "dynamic-string.h"
+#include "fatal-signal.h"
#include "file.h"
#include "lockfile.h"
#include "log.h"
{
set_program_name(argv[0]);
parse_options(argc, argv);
- signal(SIGPIPE, SIG_IGN);
+ fatal_ignore_sigpipe();
run_command(argc - optind, argv + optind, get_all_commands());
return 0;
}
#include "command-line.h"
#include "compiler.h"
#include "daemon.h"
+#include "fatal-signal.h"
#include "learning-switch.h"
#include "ofp-parse.h"
#include "ofp-version-opt.h"
proctitle_init(argc, argv);
set_program_name(argv[0]);
parse_options(argc, argv);
- signal(SIGPIPE, SIG_IGN);
+ fatal_ignore_sigpipe();
if (argc - optind < 1) {
ovs_fatal(0, "at least one vconn argument required; "
#include <stdlib.h>
#include <unistd.h>
#include "command-line.h"
+#include "fatal-signal.h"
#include "ofp-msgs.h"
#include "ofp-util.h"
#include "ofpbuf.h"
set_program_name(argv[0]);
vlog_set_levels(NULL, VLF_ANY_FACILITY, VLL_EMER);
vlog_set_levels(NULL, VLF_CONSOLE, VLL_DBG);
- signal(SIGPIPE, SIG_IGN);
+ fatal_ignore_sigpipe();
time_alarm(10);
#include "dirs.h"
#include "dpif.h"
#include "dynamic-string.h"
+#include "fatal-signal.h"
#include "flow.h"
#include "match.h"
#include "netdev.h"
{
set_program_name(argv[0]);
parse_options(argc, argv);
- signal(SIGPIPE, SIG_IGN);
+ fatal_ignore_sigpipe();
run_command(argc - optind, argv + optind, get_all_commands());
return 0;
}
#include "compiler.h"
#include "dirs.h"
#include "dynamic-string.h"
+#include "fatal-signal.h"
#include "nx-match.h"
#include "odp-util.h"
#include "ofp-actions.h"
{
set_program_name(argv[0]);
parse_options(argc, argv);
- signal(SIGPIPE, SIG_IGN);
+ fatal_ignore_sigpipe();
run_command(argc - optind, argv + optind, get_all_commands());
return 0;
}
#include "compiler.h"
#include "dirs.h"
#include "dynamic-string.h"
+#include "fatal-signal.h"
#include "hash.h"
#include "json.h"
#include "ovsdb-data.h"
char *args;
set_program_name(argv[0]);
- signal(SIGPIPE, SIG_IGN);
+ fatal_ignore_sigpipe();
vlog_set_levels(NULL, VLF_CONSOLE, VLL_WARN);
vlog_set_levels(&VLM_reconnect, VLF_ANY_FACILITY, VLL_WARN);
ovsrec_init();
#include "dirs.h"
#include "dpif.h"
#include "dummy.h"
+#include "fatal-signal.h"
#include "memory.h"
#include "netdev.h"
#include "openflow/openflow.h"
set_program_name(argv[0]);
service_start(&argc, &argv);
remote = parse_options(argc, argv, &unixctl_path);
- signal(SIGPIPE, SIG_IGN);
+ fatal_ignore_sigpipe();
ovsrec_init();
daemonize_start();
#include "compiler.h"
#include "dirs.h"
#include "dynamic-string.h"
+#include "fatal-signal.h"
#include "hash.h"
#include "json.h"
#include "ovsdb-data.h"
char *args;
set_program_name(argv[0]);
- signal(SIGPIPE, SIG_IGN);
+ fatal_ignore_sigpipe();
vlog_set_levels(NULL, VLF_CONSOLE, VLL_WARN);
vlog_set_levels(&VLM_reconnect, VLF_ANY_FACILITY, VLL_WARN);
vteprec_init();