From 69e53926640605542bc0a27b20bd0bc49fa23d58 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Sun, 15 Nov 2015 10:36:05 +0800 Subject: [PATCH] Revert "WAR for some AOSPs" This reverts commit 6bdd92798c79b9166c88ee2d5db61ff0244d8ead. --- src/utils.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/utils.c b/src/utils.c index ad8095b0..fd277d2c 100644 --- a/src/utils.c +++ b/src/utils.c @@ -292,8 +292,8 @@ void usage() void daemonize(const char * path) { #ifndef __MINGW32__ - /* Our process ID */ - pid_t pid; + /* Our process ID and Session ID */ + pid_t pid, sid; /* Fork off the parent process */ pid = fork(); @@ -314,10 +314,6 @@ void daemonize(const char * path) exit(EXIT_SUCCESS); } -#ifndef ANDROID - /* Our session ID */ - pid_t sid; - /* Change the file mode mask */ umask(0); @@ -335,7 +331,6 @@ void daemonize(const char * path) /* Log the failure */ exit(EXIT_FAILURE); } -#endif /* Close out the standard file descriptors */ close(STDIN_FILENO);