Page MenuHomeFreeBSD

rc.subr: Fix slow shutdown issue
ClosedPublic

Authored by des on Thu, Oct 23, 10:29 AM.
Tags
None
Referenced Files
F134810393: D53294.id165161.diff
Tue, Nov 4, 6:08 PM
Unknown Object (File)
Mon, Nov 3, 7:18 PM
Unknown Object (File)
Mon, Nov 3, 7:14 PM
Unknown Object (File)
Sat, Nov 1, 3:29 AM
Unknown Object (File)
Fri, Oct 31, 7:58 PM
Unknown Object (File)
Fri, Oct 31, 7:48 PM
Unknown Object (File)
Sun, Oct 26, 4:18 PM
Unknown Object (File)
Sun, Oct 26, 4:18 PM
Subscribers

Details

Summary

Instead of sleeping after pwait returns, use its new -p option to
obtain the list of processes that still have not terminated.

Fixes: 5953e7c98427 ("rc.subr: Move the sleep in wait_for_pids")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 68046
Build 64929: arc lint + arc unit

Event Timeline

des requested review of this revision.Thu, Oct 23, 10:29 AM
markj added inline comments.
libexec/rc/rc.subr
797

Presumably this should be for _j in $@?

des marked an inline comment as done.Mon, Oct 27, 11:40 AM
des added inline comments.
libexec/rc/rc.subr
797

from sh(1):

The syntax of the for command is:

for variable [in word ...]
    do list
    done

If in and the following words are omitted, in "$@" is used instead.

des marked an inline comment as done.Mon, Oct 27, 11:40 AM
markj added inline comments.
libexec/rc/rc.subr
804

I think this check is unnecessary: if $_list is empty, the following code will do nothing.

This revision is now accepted and ready to land.Mon, Oct 27, 1:13 PM
0mp added a subscriber: 0mp.

otherwise, seems OK

libexec/rc/rc.subr
797

I think for _j in "$@"; do would be better here. Omitting in "$@" is unnecessarily cryptic and also a lot of other for loops in rc.subr use in "$@".

des marked 2 inline comments as done.Mon, Oct 27, 6:09 PM
This revision now requires review to proceed.Mon, Oct 27, 7:31 PM
This revision was not accepted when it landed; it landed in state Needs Review.Tue, Oct 28, 11:58 AM
This revision was automatically updated to reflect the committed changes.