/*
- * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/* Signals to catch. */
static const int fatal_signals[] = { SIGTERM, SIGINT, SIGHUP, SIGALRM };
-/* Signals to catch as a sigset_t. */
-static sigset_t fatal_signal_set;
-
/* Hooks to call upon catching a signal */
struct hook {
void (*hook_cb)(void *aux);
xpipe_nonblocking(signal_fds);
- sigemptyset(&fatal_signal_set);
for (i = 0; i < ARRAY_SIZE(fatal_signals); i++) {
int sig_nr = fatal_signals[i];
struct sigaction old_sa;
- sigaddset(&fatal_signal_set, sig_nr);
xsigaction(sig_nr, NULL, &old_sa);
if (old_sa.sa_handler == SIG_DFL
&& signal(sig_nr, fatal_signal_handler) == SIG_ERR) {
- VLOG_FATAL("signal failed (%s)", strerror(errno));
+ VLOG_FATAL("signal failed (%s)", ovs_strerror(errno));
}
}
atexit(atexit_handler);
{
int error = unlink(file) ? errno : 0;
if (error) {
- VLOG_WARN("could not unlink \"%s\" (%s)", file, strerror(error));
+ VLOG_WARN("could not unlink \"%s\" (%s)", file, ovs_strerror(error));
}
fatal_signal_remove_file_to_unlink(file);