aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-11-12 00:18:11 +0900
committerOphestra <cat@gensokyo.uk>2025-11-12 00:18:29 +0900
commitac3463589035394bedbedb15a323298251ed2c14 (patch)
treed8b863e0faf4d44c2d4e12a8378f7fe9820c04d1 /test
parent9dec9dbc4bbd09a59cf35f4000d26794b42edcfc (diff)
container: set FD_CLOEXEC on all open files
While fd created from this side always has the FD_CLOEXEC flag, the same is not true for files left open by the parent. This change prevents those files from leaking into the container. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test')
-rw-r--r--test/sandbox/test.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/sandbox/test.py b/test/sandbox/test.py
index 24fd1d3a..ad38e73c 100644
--- a/test/sandbox/test.py
+++ b/test/sandbox/test.py
@@ -46,7 +46,7 @@ swaymsg("exec hakurei run cat")
check_filter(0, "pdlike", "cat")
# Check fd leak:
-swaymsg("exec hakurei -v run sleep infinity")
+swaymsg("exec exec 127</proc/cmdline && hakurei -v run sleep infinity")
pd_identity0_sleep_pid = int(machine.wait_until_succeeds("pgrep -U 10000 -x sleep", timeout=60))
print(machine.succeed(f"hakurei-test fd {pd_identity0_sleep_pid}"))
machine.succeed(f"kill -INT {pd_identity0_sleep_pid}")