(start_server, empth_start): Passed uninitialized sa_mask to
sigaction(). This used to broken only when SA_SIGINFO wasn't defined, until main.c rev. 1.46 and pthread.c rev. 1.10 broke it unconditionally.
This commit is contained in:
parent
66201f9d45
commit
fd237f1722
2 changed files with 2 additions and 0 deletions
|
@ -97,6 +97,7 @@ empth_start(void *arg)
|
||||||
struct sigaction act;
|
struct sigaction act;
|
||||||
|
|
||||||
/* actually it should inherit all this from main but... */
|
/* actually it should inherit all this from main but... */
|
||||||
|
act.sa_flags = 0;
|
||||||
sigemptyset(&act.sa_mask);
|
sigemptyset(&act.sa_mask);
|
||||||
act.sa_handler = shutdwn;
|
act.sa_handler = shutdwn;
|
||||||
sigaction(SIGTERM, &act, NULL);
|
sigaction(SIGTERM, &act, NULL);
|
||||||
|
|
|
@ -299,6 +299,7 @@ start_server(int flags)
|
||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
/* signal() should not be used with mit pthreads. Anyway if u
|
/* signal() should not be used with mit pthreads. Anyway if u
|
||||||
have a posix threads u definitly have posix signals -- Sasha */
|
have a posix threads u definitly have posix signals -- Sasha */
|
||||||
|
act.sa_flags = 0;
|
||||||
sigemptyset(&act.sa_mask);
|
sigemptyset(&act.sa_mask);
|
||||||
act.sa_handler = shutdwn;
|
act.sa_handler = shutdwn;
|
||||||
sigaction(SIGTERM, &act, NULL);
|
sigaction(SIGTERM, &act, NULL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue