We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d33271c commit 532dec0Copy full SHA for 532dec0
tests/posix/exec_sigmask.sh
@@ -1,4 +1,16 @@
1
# Regression test: restore the signal mask after fork()
2
3
-test "$UNAME" = "Linux" || skip
4
-bfs_diff /proc/self/status -exec grep '^SigBlk:' {} +
+cd "$TEST"
+mkfifo p1 p2
5
+
6
+{
7
+ # Get the PID of `sh`
8
+ read -r pid <p1
9
+ # Send SIGTERM -- this will hang forever if signals are blocked
10
+ kill $pid
11
+} &
12
13
+# Write the `sh` PID to p1, then hang reading p2 until we're killed
14
+! invoke_bfs p1 -exec sh -c 'echo $$ >p1 && read -r _ <p2' {} + || fail
15
16
+wait
0 commit comments