]> git.ozlabs.org Git - ppp.git/commitdiff
fix random signals blocking in handle_events()
authorAlexandr D. Kanevskiy <kad@blackcatlinux.com>
Mon, 12 Apr 2004 05:02:00 +0000 (05:02 +0000)
committerAlexandr D. Kanevskiy <kad@blackcatlinux.com>
Mon, 12 Apr 2004 05:02:00 +0000 (05:02 +0000)
pppd/main.c

index 0be799820739344bd9aa45344b19c26a67d68b03..dddcfe44db7b4e7c02e66dba5f4bd3af38769301 100644 (file)
@@ -40,7 +40,7 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#define RCSID  "$Id: main.c,v 1.134 2004/04/12 04:53:00 kad Exp $"
+#define RCSID  "$Id: main.c,v 1.135 2004/04/12 05:02:00 kad Exp $"
 
 #include <stdio.h>
 #include <ctype.h>
 
 #include <stdio.h>
 #include <ctype.h>
@@ -650,6 +650,13 @@ handle_events()
     struct timeval timo;
     sigset_t mask;
 
     struct timeval timo;
     sigset_t mask;
 
+    sigemptyset(&mask);
+    sigaddset(&mask, SIGHUP);
+    sigaddset(&mask, SIGINT);
+    sigaddset(&mask, SIGTERM);
+    sigaddset(&mask, SIGCHLD);
+    sigaddset(&mask, SIGUSR2);
+
     kill_link = open_ccp_flag = 0;
     if (sigsetjmp(sigjmp, 1) == 0) {
        sigprocmask(SIG_BLOCK, &mask, NULL);
     kill_link = open_ccp_flag = 0;
     if (sigsetjmp(sigjmp, 1) == 0) {
        sigprocmask(SIG_BLOCK, &mask, NULL);