That way, we can set for the child process to die before we start
waiting.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
CTX_DEBUG(jail->ctx, "Launched child process in jail with PID %d\n", pid);
- // Wait for the parent to finish initialization
- r = pakfire_jail_wait_for_signal(jail, ctx->completed_fd);
- if (r)
- return r;
-
// Die with parent
r = prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
if (r) {
return 126;
}
+ // Wait for the parent to finish initialization
+ r = pakfire_jail_wait_for_signal(jail, ctx->completed_fd);
+ if (r)
+ return r;
+
// Fetch UID/GID
uid_t uid = getuid();
gid_t gid = getgid();