055396
diff -up netkit-telnet-0.17/telnetd/sys_term.c.rh825946 netkit-telnet-0.17/telnetd/sys_term.c
055396
--- netkit-telnet-0.17/telnetd/sys_term.c.rh825946	1999-12-17 15:28:47.000000000 +0100
055396
+++ netkit-telnet-0.17/telnetd/sys_term.c	2012-06-14 14:05:30.538342755 +0200
055396
@@ -723,6 +723,9 @@ void cleanup(int sig) {
055396
     char *p;
055396
     (void)sig;
055396
 
055396
+    /* to avoid a race for wtmp lock */
055396
+    signal(SIGCHLD, SIG_IGN);
055396
+
055396
     p = line + sizeof("/dev/") - 1;
055396
     if (logout(p)) logwtmp(p, "", "");
055396
 #ifdef PARANOID_TTYS
055396
diff -up netkit-telnet-0.17/telnetd/telnetd.c.rh825946 netkit-telnet-0.17/telnetd/telnetd.c
055396
--- netkit-telnet-0.17/telnetd/telnetd.c.rh825946	2012-06-14 14:04:42.000000000 +0200
055396
+++ netkit-telnet-0.17/telnetd/telnetd.c	2012-06-14 14:06:01.547291404 +0200
055396
@@ -1147,8 +1147,6 @@ void telnet(int f, int p)
055396
 	if (FD_ISSET(p, &obits) && (pfrontp - pbackp) > 0)
055396
 	    ptyflush();
055396
     }
055396
-    /* to avoid a race for wtmp lock */
055396
-    signal(SIGCHLD, SIG_IGN);
055396
     cleanup(0);
055396
 }  /* end of telnet */
055396