"sh", "-c", "chmod 1777 /dev/shm && exec $0 \"$@\"",
]
+ if setpgid := find_binary("setpgid"):
+ cmdline += [setpgid, "--foreground"]
+
try:
result = run([*cmdline, *cmd], env=env, log=False, stdin=stdin, stdout=stdout, input=input)
except subprocess.CalledProcessError as e:
"--unsetenv", "TMPDIR",
]
+ if setpgid := find_binary("setpgid"):
+ cmdline += [setpgid, "--foreground"]
+
if (root / "etc/machine-id").exists():
# Make sure /etc/machine-id is not overwritten by any package manager post install scripts.
cmdline += ["--ro-bind", root / "etc/machine-id", root / "etc/machine-id"]
*options,
]
+ if setpgid := find_binary("setpgid", root):
+ cmdline += [setpgid, "--foreground"]
+
return apivfs_cmd(root) + cmdline