Skip to content

Commit edd2f3d

Browse files
committed
Use $! inside the bash -c command, to simplify things.
1 parent a383410 commit edd2f3d

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

compiler-rt/test/fuzzer/fork-sigusr.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ RUN: %cpp_compiler %S/SleepOneSecondTest.cpp -o %t/ForkSIGUSR
88
# The line below needs the " | env" at the end, in order to make the
99
# script continue executing, rather than waiting (forever) for the
1010
# 'nohup run...' command to finish.
11-
RUN: bash -c "nohup %run %t/ForkSIGUSR -fork=3 -ignore_crashes=1 2>%t/log &" | env
12-
RUN: ps aux | grep ForkSIGUSR | grep -v "grep" | awk '{print $2}' | tr -d '\n' > %t2
11+
RUN: bash -c "nohup %run %t/ForkSIGUSR -fork=3 -ignore_crashes=1 2>%t/log & echo -n $! > %t2" | env
1312
RUN: sleep 3
1413
RUN: kill -SIGUSR2 %{readfile:%t2}
1514
RUN: sleep 6

compiler-rt/test/fuzzer/sigint.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ RUN: %msan_compiler %S/SleepOneSecondTest.cpp -o %t/LFSIGINT
99
# The line below needs the " | env" at the end, in order to make the
1010
# script continue executing, rather than waiting (forever) for the
1111
# 'nohup run...' command to finish.
12-
RUN: bash -c "nohup %run %t/LFSIGINT 2> %t/log &" | env
13-
RUN: ps aux | grep LFSIGINT | grep -v "grep" | awk '{print $2}' | tr -d '\n' > %t2
12+
RUN: bash -c "nohup %run %t/LFSIGINT 2> %t/log & echo -n $! > %t2" | env
1413
RUN: sleep 2
1514
RUN: kill -SIGINT %{readfile:%t2}
1615
RUN: sleep 3

compiler-rt/test/fuzzer/sigusr.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ RUN: %cpp_compiler %S/SleepOneSecondTest.cpp -o %t/LFSIGUSR
99
# The line below needs the " | env" at the end, in order to make the
1010
# script continue executing, rather than waiting (forever) for the
1111
# 'nohup run...' command to finish.
12-
RUN: bash -c "nohup %run %t/LFSIGUSR 2> %t/log &"| env
13-
RUN: ps aux | grep LFSIGUSR | grep -v "grep" | awk '{print $2}' | tr -d '\n' > %t2
12+
RUN: bash -c "nohup %run %t/LFSIGUSR 2> %t/log & echo -n $! > %t2"| env
1413
RUN: sleep 2
1514
RUN: kill -SIGUSR1 %{readfile:%t2}
1615
RUN: sleep 3

0 commit comments

Comments
 (0)