]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsfd: (tests) fix process leak
authorMasatake YAMATO <yamato@redhat.com>
Fri, 19 May 2023 15:29:39 +0000 (00:29 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Sun, 21 May 2023 21:45:22 +0000 (06:45 +0900)
Unifying multiple invocations of kill command and wait command
into two is suggested by Thomas Weißschuh <thomas@t-8ch.de>.

Addresses: https://lore.kernel.org/util-linux/652d32c5-4b33-ce3a-3de7-9ebc064bbdcb@gmail.com/
Reported-by: Bruce Dubbs <bruce.dubbs@gmail.com>
Tested-by: Bruce Dubbs <bruce.dubbs@gmail.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
tests/ts/lsfd/option-inet

index 21e66f700424f4c38a7fea65b149e3c5eef707ef..4490e411b0c887aaa155952d2002552ab04d4415 100755 (executable)
@@ -84,14 +84,8 @@ ts_cd "$TS_OUTDIR"
                   -o ASSOC,TYPE,NAME \
                   -Q "(PID == $PID0) or (PID == $PID1) or (PID == $PID2) or (PID == $PID3) or (PID == $PID4)"
 
-    kill -CONT "${PID0}"
-    wait "${PID0}"
-
-    kill -CONT "${PID1}"
-    wait "${PID1}"
-
-    kill -CONT "${PID2}"
-    wait "${PID2}"
+    kill -CONT "${PID0}" "${PID1}" "${PID2}" "${PID3}" "${PID4}"
+    wait       "${PID0}" "${PID1}" "${PID2}" "${PID3}" "${PID4}"
 } > "$TS_OUTPUT" 2>&1
 
 ts_finalize