18 lines
541 B
Diff
18 lines
541 B
Diff
Description: wait for correct parent to die
|
|
Author: Jörg Sommer <joerg@jo-so.de>
|
|
--- a/unix/detach.c
|
|
+++ b/unix/detach.c
|
|
@@ -98,10 +98,8 @@ usysdep_detach ()
|
|
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 ();
|