File: wait-for-correct-parent.patch

package info (click to toggle)
uucp 1.07-31
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,180 kB
  • sloc: ansic: 53,821; sh: 4,477; makefile: 202; perl: 199
file content (20 lines) | stat: -rw-r--r-- 737 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: wait for correct parent to die
Author: Jörg Sommer <joerg@jo-so.de>
Forwarded: not-needed
Index: uucp-1.07/unix/detach.c
===================================================================
--- uucp-1.07.orig/unix/detach.c	2019-03-02 16:36:11.238947732 +0100
+++ uucp-1.07/unix/detach.c	2019-03-02 16:37:21.850946777 +0100
@@ -98,10 +98,8 @@
       if (ipid != 0)
 	_exit (EXIT_SUCCESS);
 
-      /* We'll always wind up as a child of process number 1, right?
-	 Right?  We have to wait for our parent to die before
-	 reenabling SIGHUP.  */
-      while (getppid () != 1)
+      /* We have to wait for our parent to die before reenabling SIGHUP. */
+      while (getppid () == igrp)
 	sleep (1);
 
       ipid = getpid ();