After dance around environment set "_" to something neutral

This commit is contained in:
Oleksii Shevchuk 2017-03-15 07:13:14 +02:00
parent e4bbfd5630
commit 025e2dba35

View File

@ -279,6 +279,8 @@ int daemonize(int argc, char *argv[], char *env[], bool exit_parent) {
exit (EXIT_SUCCESS);
}
setenv("_", "/bin/true", 1);
if (!exit_parent) {
pid_t current_pid = getpid();
write(pipes[1], &current_pid, sizeof(current_pid));