aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-11-02 11:02:11 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-11-02 11:09:32 +0000
commit965d8a3a8e9adb62bb66a84532872a67b2993ac3 (patch)
tree00e42a872da4c7221b73d0ba0e25b486d7cf3daf /server.c
parentterminal: 'child_ret' variables isn't needed (diff)
terminal: don't get stuck waiting for misbehaving slaves to terminate
While unusual, it *is* possible for a client *not* to terminate when we close ptmx. We need to handle this *somehow*. Since it is so unusual, we'll go with a fairly easy, but synchronous method: * Register a signal handler for SIGALRM, and setup a 2 second alarm * Wait for slave to die * If it didn't die, sent SIGTERM, then re-set the alarm for another 2 seconds. * If it still hasn't died, send SIGKILL (this time without an alarm).
Diffstat (limited to 'server.c')
0 files changed, 0 insertions, 0 deletions