From: Masatake YAMATO Date: Fri, 19 May 2023 15:29:39 +0000 (+0900) Subject: lsfd: (tests) fix process leak X-Git-Tag: v2.40-rc1~452^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=47035719fc356bb50f8304a1ae78a3361135be4b;p=thirdparty%2Futil-linux.git lsfd: (tests) fix process leak Unifying multiple invocations of kill command and wait command into two is suggested by Thomas Weißschuh . Addresses: https://lore.kernel.org/util-linux/652d32c5-4b33-ce3a-3de7-9ebc064bbdcb@gmail.com/ Reported-by: Bruce Dubbs Tested-by: Bruce Dubbs Signed-off-by: Masatake YAMATO --- diff --git a/tests/ts/lsfd/option-inet b/tests/ts/lsfd/option-inet index 21e66f7004..4490e411b0 100755 --- a/tests/ts/lsfd/option-inet +++ b/tests/ts/lsfd/option-inet @@ -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