diff options
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/unschroot.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/unschroot.py b/examples/unschroot.py index 88c105f..3e3cc3a 100755 --- a/examples/unschroot.py +++ b/examples/unschroot.py @@ -228,6 +228,7 @@ def do_run_session(args: argparse.Namespace) -> None: os.setuid(spw.pw_uid) if not args.command: args.command.append("bash") + childsock.recv(1) linuxnamespaces.prctl_set_pdeathsig(signal.SIGTERM) if "PATH" not in os.environ: if spw.pw_uid == 0: @@ -244,6 +245,7 @@ def do_run_session(args: argparse.Namespace) -> None: pidfd = fds[0] os.waitpid(pid, 0) linuxnamespaces.prctl_set_child_subreaper(False) + mainsock.send(b"\0") sys.exit(os.waitid(os.P_PIDFD, pidfd, os.WEXITED).si_status) |