Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/lpr/lpd If we set SIGCHLD to SIG_IGN then any wait(...



details:   https://anonhg.NetBSD.org/src/rev/cb65937073f0
branches:  trunk
changeset: 587291:cb65937073f0
user:      garbled <garbled%NetBSD.org@localhost>
date:      Wed Jan 18 23:17:38 2006 +0000

description:
If we set SIGCHLD to SIG_IGN then any wait()'s on the child processes will
return -1.  This causes filters to fail because we get a value for
child_pid we weren't expecting.  Set SIGCHLD to SIG_DFL instead to clear
the reapchild setting when forking the child lpd.

diffstat:

 usr.sbin/lpr/lpd/lpd.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r f454dd4665eb -r cb65937073f0 usr.sbin/lpr/lpd/lpd.c
--- a/usr.sbin/lpr/lpd/lpd.c    Wed Jan 18 19:11:25 2006 +0000
+++ b/usr.sbin/lpr/lpd/lpd.c    Wed Jan 18 23:17:38 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lpd.c,v 1.53 2005/12/02 11:33:39 yamt Exp $    */
+/*     $NetBSD: lpd.c,v 1.54 2006/01/18 23:17:38 garbled Exp $ */
 
 /*
  * Copyright (c) 1983, 1993, 1994
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)lpd.c      8.7 (Berkeley) 5/10/95";
 #else
-__RCSID("$NetBSD: lpd.c,v 1.53 2005/12/02 11:33:39 yamt Exp $");
+__RCSID("$NetBSD: lpd.c,v 1.54 2006/01/18 23:17:38 garbled Exp $");
 #endif
 #endif /* not lint */
 
@@ -334,7 +334,7 @@
                
                switch (fork()) {
                case 0:
-                       signal(SIGCHLD, SIG_IGN);
+                       signal(SIGCHLD, SIG_DFL);
                        signal(SIGHUP, SIG_IGN);
                        signal(SIGINT, SIG_IGN);
                        signal(SIGQUIT, SIG_IGN);



Home | Main Index | Thread Index | Old Index