From aa0c0de3508e9150eb0ea610f696ee353dd9353d Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Thu, 20 Aug 2026 22:49:04 -0700 Subject: [PATCH] tests: stdbuf: check that a child process isn't created * tests/misc/stdbuf.sh: Add a test case. --- tests/misc/stdbuf.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/misc/stdbuf.sh b/tests/misc/stdbuf.sh index 170d25c5f..79d15b374 100755 --- a/tests/misc/stdbuf.sh +++ b/tests/misc/stdbuf.sh @@ -55,6 +55,9 @@ stdbuf -i0 -o0 -e0 true || fail=1 #check all files returns_ 126 env . && { returns_ 126 stdbuf -o1 . || fail=1; } # invalid command returns_ 127 stdbuf -o1 no_such || fail=1 # no such command +# Test that 'stdbuf' doesn't create a child process. +(ulimit -u 0; exec stdbuf -oL true) || fail=1 + # Terminate any background processes cleanup_() { kill $pid 2>/dev/null && wait $pid; }