diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-10-28 23:11:07 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-10-28 23:11:07 +0000 |
commit | e65aa04ad780b76c3356d281677bb7a71c89cda3 (patch) | |
tree | 3111c99ec206282e6b34a4ce397332f8b6e8f1e1 /server.c | |
parent | d0afc47bfb55ad1d5950b0a316870106ec33a2f6 (diff) |
Sync OpenBSD patchset 466:
Clear signal flags /before/ taking action and continue afterwards to reduce
chance of dropping signals. Pointed out by deraadt@.
Diffstat (limited to 'server.c')
-rw-r--r-- | server.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: server.c,v 1.211 2009-10-23 17:49:47 tcunha Exp $ */ +/* $Id: server.c,v 1.212 2009-10-28 23:11:07 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -331,15 +331,17 @@ server_main(int srv_fd) /* Handle child exit. */ if (sigchld) { - server_child_signal(); sigchld = 0; + server_child_signal(); + continue; } /* Recreate socket on SIGUSR1. */ if (sigusr1) { + sigusr1 = 0; close(srv_fd); srv_fd = server_create_socket(); - sigusr1 = 0; + continue; } /* Initialise pollfd array and add server socket. */ |