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