]> git.pond.sub.org Git - empserver/commitdiff
(start_server, empth_start): Passed uninitialized sa_mask to
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 8 Nov 2005 21:42:38 +0000 (21:42 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 8 Nov 2005 21:42:38 +0000 (21:42 +0000)
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.

src/lib/empthread/pthread.c
src/server/main.c

index 408bfb779d3007e2649d481f8599f287c23717ae..65438a84d0c3d5a42aae6683fdd662b5c8ccd692 100644 (file)
@@ -97,6 +97,7 @@ empth_start(void *arg)
     struct sigaction act;
 
     /* actually it should inherit all this from main but... */
+    act.sa_flags = 0;
     sigemptyset(&act.sa_mask);
     act.sa_handler = shutdwn;
     sigaction(SIGTERM, &act, NULL);
index 35d6d6bd671a43a30d88eb45b93310cc395919ab..817f8c03a3aec27062ef93e71df62260ca1e17d1 100644 (file)
@@ -299,6 +299,7 @@ start_server(int flags)
 #if !defined(_WIN32)
     /* signal() should not be used with mit pthreads. Anyway if u
        have a posix threads u definitly have posix signals -- Sasha */
+    act.sa_flags = 0;
     sigemptyset(&act.sa_mask);
     act.sa_handler = shutdwn;
     sigaction(SIGTERM, &act, NULL);