(empth_init_signals): Don't catch SIGINT and SIGTERM.
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 7 Jun 2006 21:01:16 +0000 (21:01 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Wed, 7 Jun 2006 21:01:16 +0000 (21:01 +0000)
commit7183516d915229b0dd9c146e4d67cb9c5cd8da1b
treed43aaa617f6b878bb278cec5d94771f8f9d1b3fe
parentf51769659c49f0d7d72fd1ba925fa08e65a87fa3
(empth_init_signals): Don't catch SIGINT and SIGTERM.
(empth_wait_for_shutdown): New.
(main): Use it to wait for shutdown signal, then shut down.  Closes
#770492.
(empth_exit): Remove the weird special case for main thread.

Implement empth_wait_for_shutdown() for EMPTH_LWP:
[EMPTH_LWP] (lwpInitSigWait, lwpSigWait, lwpSigWakeup): New.
Declaration of lwpSigWait was accidentally committed in the previous
revision of lwp.h.
[EMPTH_LWP] (lwpInitSystem): New parameter waitset, pass it on to
lwpInitSigWait().
[EMPTH_LWP] (lwpReschedule): Call lwpSigWakeup().
[EMPTH_LWP] (empth_init): Declare signals needed by
empth_wait_for_shutdown().
(empth_wait_for_shutdown): Implement on top of lwpSigWait().

Implement empth_wait_for_shutdown() for EMPTH_POSIX:
[EMPTH_POSIX] (empth_init): Block signals, so that
empth_wait_for_shutdown() can use sigwait() safely.
(empth_wait_for_shutdown): Implement on top of sigwait().

Implement empth_wait_for_shutdown() for EMPTH_W32:
(empth_wait_for_shutdown): Implement on top of loc_BlockMainThread().
include/empthread.h
include/lwp.h
src/lib/empthread/lwp.c
src/lib/empthread/ntthread.c
src/lib/empthread/posix.c
src/lib/empthread/pthread.c
src/lib/lwp/lwp.c
src/lib/lwp/lwpint.h
src/lib/lwp/sig.c [new file with mode: 0644]
src/server/main.c