From d54ead7fb922cfa661c7b7f0d0b2ba1251cdea7f Mon Sep 17 00:00:00 2001 From: rsc Date: Tue, 28 Dec 2004 04:20:39 +0000 Subject: more freebsd work --- src/libthread/daemonize.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/libthread/daemonize.c') diff --git a/src/libthread/daemonize.c b/src/libthread/daemonize.c index 65af29ab..dab6e42b 100644 --- a/src/libthread/daemonize.c +++ b/src/libthread/daemonize.c @@ -1,8 +1,3 @@ -#include -#include -#include -#include -#include #include "threadimpl.h" #undef pipe @@ -15,8 +10,10 @@ static void child(void) { int status; - if(wait(&status) == sigpid && WIFEXITED(status)) - _exit(WEXITSTATUS(status)); + if(wait(&status) == sigpid) + if(WIFEXITED(status)) + _exit(WEXITSTATUS(status)); + _exit(97); } static void @@ -83,7 +80,7 @@ _threadsetupdaemonize(void) child(); if(n > 0) break; - sysfatal("passer pipe read: %r"); + print("passer read: %r\n"); } buf[n] = 0; _exit(atoi(buf)); -- cgit v1.2.3