8182034: os::Posix::is_valid_signal() should, if it uses sigaddset, initialize the signal set
Added missing sigemptyset. Reviewed-by: kbarrett, clanger
This commit is contained in:
parent
ec241eb2a4
commit
7c972a103a
@ -760,6 +760,7 @@ bool os::Posix::is_valid_signal(int sig) {
|
|||||||
#else
|
#else
|
||||||
// Use sigaddset to check for signal validity.
|
// Use sigaddset to check for signal validity.
|
||||||
sigset_t set;
|
sigset_t set;
|
||||||
|
sigemptyset(&set);
|
||||||
if (sigaddset(&set, sig) == -1 && errno == EINVAL) {
|
if (sigaddset(&set, sig) == -1 && errno == EINVAL) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user