Index: src/libthread/daemonize.c
--- src/libthread/daemonize.c.orig
+++ src/libthread/daemonize.c
@@ -106,7 +106,7 @@ _threadsetupdaemonize(void)
 	 * Put it in its own process group so that we don't get a SIGHUP
 	 * when the parent exits.
 	 */
-	setpgrp();
+	setpgid(0, 0);
 
 	if(pipe(p) < 0)
 		sysfatal("passer pipe: %r");
