Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lsfd: (tests) fix process leak #2246

Merged
merged 1 commit into from May 22, 2023

Conversation

masatake
Copy link
Member

@masatake masatake commented May 19, 2023

wait "${PID2}"
for pid in "${PID0}" "${PID1}" "${PID2}" "${PID3}" "${PID4}"; do
kill -CONT "${pid}"
wait "${pid}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't this be simplified to:

kill -CONT "${PID0}" "${PID1}" "${PID2}" "${PID3}" "${PID4}"
wait       "${PID0}" "${PID1}" "${PID2}" "${PID3}" "${PID4}"

It would be a bit faster and easier to read, IMO.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks better. I'll update. Thank you.

@t-8ch
Copy link
Member

t-8ch commented May 21, 2023

@masatake FYI the util-linux list is available on lore.kernel.org which is nicer to use than marc.info:

https://lore.kernel.org/util-linux/652d32c5-4b33-ce3a-3de7-9ebc064bbdcb@gmail.com/

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>
@masatake masatake marked this pull request as ready for review May 21, 2023 21:46
@masatake
Copy link
Member Author

@t-8ch, thank you for the tip.

@karelzak karelzak merged commit 3dae5ca into util-linux:master May 22, 2023
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants