From: Martin Willi Date: Fri, 11 Jul 2014 12:40:56 +0000 (+0200) Subject: starter: Do not close all file descriptors after fork() X-Git-Tag: 5.2.1dr1~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8986e2da47ec6e5a57483a1034d3332f8fdd2533;p=thirdparty%2Fstrongswan.git starter: Do not close all file descriptors after fork() As we use libstrongswan and expect that it still works after the fork, we can't just closefrom() all file descriptors. Watcher, for example, uses a pipe to notify FDSET changes, which must be kept open. Reverts 652ddf5ce2fad08f6569096dd56a821500cc5ba4. --- diff --git a/src/starter/starter.c b/src/starter/starter.c index ef5780843a..71f33ae914 100644 --- a/src/starter/starter.c +++ b/src/starter/starter.c @@ -612,7 +612,6 @@ int main (int argc, char **argv) int fnull; close_log(); - closefrom(3); fnull = open("/dev/null", O_RDWR); if (fnull >= 0)