git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'b5d57fc87925cb3c029de19d0a94de5ca07ae28e'
[sliver-openvswitch.git]
/
lib
/
signals.c
diff --git
a/lib/signals.c
b/lib/signals.c
index
b712f7e
..
f31bc52
100644
(file)
--- a/
lib/signals.c
+++ b/
lib/signals.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 2008, 2009, 2011, 2012 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-16,7
+16,6
@@
#include <config.h>
#include "signals.h"
#include <config.h>
#include "signals.h"
-#include <assert.h>
#include <errno.h>
#include <limits.h>
#include <signal.h>
#include <errno.h>
#include <limits.h>
#include <signal.h>
@@
-63,9
+62,7
@@
signal_init(void)
static bool inited;
if (!inited) {
inited = true;
static bool inited;
if (!inited) {
inited = true;
- xpipe(fds);
- xset_nonblocking(fds[0]);
- xset_nonblocking(fds[1]);
+ xpipe_nonblocking(fds);
}
}
}
}
@@
-84,7
+81,7
@@
signal_register(int signr)
s->signr = signr;
/* Set up signal handler. */
s->signr = signr;
/* Set up signal handler. */
- assert(signr >= 1 && signr < N_SIGNALS);
+
ovs_
assert(signr >= 1 && signr < N_SIGNALS);
memset(&sa, 0, sizeof sa);
sa.sa_handler = signal_handler;
sigemptyset(&sa.sa_mask);
memset(&sa, 0, sizeof sa);
sa.sa_handler = signal_handler;
sigemptyset(&sa.sa_mask);
@@
-171,9
+168,10
@@
xsigaction(int signum, const struct sigaction *new, struct sigaction *old)
}
void
}
void
-x
sigproc
mask(int how, const sigset_t *new, sigset_t *old)
+x
pthread_sig
mask(int how, const sigset_t *new, sigset_t *old)
{
{
- if (sigprocmask(how, new, old)) {
- VLOG_FATAL("sigprocmask failed (%s)", strerror(errno));
+ int error = pthread_sigmask(how, new, old);
+ if (error) {
+ VLOG_FATAL("pthread_sigmask failed (%s)", strerror(error));
}
}
}
}