Page MenuHomeFreeBSD

rc.subr: Fix wait_for_pids
ClosedPublic

Authored by des on Aug 1 2025, 10:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 21, 5:49 AM
Unknown Object (File)
Thu, Sep 18, 5:01 AM
Unknown Object (File)
Fri, Aug 29, 10:16 PM
Unknown Object (File)
Aug 21 2025, 12:02 PM
Unknown Object (File)
Aug 5 2025, 4:25 PM
Unknown Object (File)
Aug 4 2025, 5:15 PM
Unknown Object (File)
Aug 4 2025, 6:16 AM
Unknown Object (File)
Aug 4 2025, 6:09 AM

Details

Summary

It looks like this function was intended to loop and print an update
whenever at least one of the waited-for processes terminates. However,
the default behavior of pwait is to block until none of the watched
processes exist. Use pwait -o instead so it only blocks until at least
one process terminates, and add a test.

Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Aug 1 2025, 10:01 PM
This revision is now accepted and ready to land.Aug 1 2025, 10:06 PM
kevans added a subscriber: kevans.
kevans added inline comments.
libexec/rc/tests/rc_subr_test.sh
3

What's with the second SPDX tag? Second one should be removed, since this is the correct position with license included.

This revision was automatically updated to reflect the committed changes.
des marked an inline comment as done.Aug 1 2025, 11:17 PM
des added inline comments.
libexec/rc/tests/rc_subr_test.sh
3

Sorry, I didn't notice your comment until after I pushed. I added the tag at the top because I somehow managed not to see the second one...

des marked an inline comment as done.Aug 1 2025, 11:17 PM