From b0c602ba7480a098cd454d8385d2821b4eaf1e70 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 22 May 2009 14:48:34 +0100 Subject: Close std{in,out,err} when daemonizing --- util-src/pposix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util-src/pposix.c b/util-src/pposix.c index 7d428c85..d26639b2 100644 --- a/util-src/pposix.c +++ b/util-src/pposix.c @@ -72,10 +72,10 @@ static int lc_daemonize(lua_State *L) } /* Close stdin, stdout, stderr */ -/* close(0); + close(0); close(1); close(2); -*/ + /* Final fork, use it wisely */ if(fork()) exit(0); -- cgit v1.2.3