summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/unschroot.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/unschroot.py b/examples/unschroot.py
index b9d4923..47d2a3c 100755
--- a/examples/unschroot.py
+++ b/examples/unschroot.py
@@ -23,6 +23,7 @@ import pwd
import shutil
import signal
import socket
+import stat
import sys
import tempfile
import typing
@@ -210,6 +211,9 @@ def do_run_session(args: argparse.Namespace) -> None:
pidfd: int
if pid == 0:
mainsock.close()
+ for fd in (1, 2):
+ if stat.S_ISFIFO(os.fstat(fd).st_mode):
+ os.fchmod(fd, 0o666)
os.chdir(session.path)
ns = (
linuxnamespaces.CloneFlags.NEWUSER