moonbridge
changeset 301:06f0b9280e77
Fixed two errors in moonbridge_io.poll(...) regarding child termination
author | jbe |
---|---|
date | Sun Jun 18 01:56:42 2017 +0200 (2017-06-18) |
parents | fba670e4beec |
children | b2282fb8553b |
files | moonbridge_io.c |
line diff
1.1 --- a/moonbridge_io.c Sun Jun 18 01:33:40 2017 +0200 1.2 +++ b/moonbridge_io.c Sun Jun 18 01:56:42 2017 +0200 1.3 @@ -1802,11 +1802,11 @@ 1.4 status = pselect( 1.5 nfds, &readfds, &writefds, &exceptfds, 1.6 use_timeout ? &timeout : NULL, 1.7 - check_sigterm ? &orig_mask : NULL 1.8 + (check_sigterm || check_sigchld) ? &orig_mask : NULL 1.9 ); 1.10 - if (check_sigterm) { 1.11 + if (check_sigterm || check_sigchld) { 1.12 if (sigprocmask(SIG_SETMASK, &orig_mask, NULL)) abort(); 1.13 - if (moonbr_io_sigterm_flag) { 1.14 + if (check_sigterm && moonbr_io_sigterm_flag) { 1.15 lua_pushboolean(L, 0); 1.16 lua_pushliteral(L, "SIGTERM received"); 1.17 lua_pushboolean(L, 1);