summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/rpc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpc.c b/src/rpc.c
index 40c2b0d..33df75b 100644
--- a/src/rpc.c
+++ b/src/rpc.c
@@ -91,8 +91,10 @@ void rpc_handle( int listenFd )
close( fd ); // TODO: Allow more for root (eg. cancel reboot/poweroff)
continue;
}
- if ( ! doublefork() )
+ if ( ! doublefork() ) {
+ close( fd );
continue; // Parent continues
+ }
handleClient( fd, &ucred );
exit( 0 );
}