Page MenuHomeFreeBSD

reboot: Use posix_spawn instead of system
ClosedPublic

Authored by imp on Feb 13 2024, 4:50 AM.
Tags
None
Referenced Files
F138109808: D43860.id134344.diff
Fri, Nov 28, 11:22 PM
Unknown Object (File)
Fri, Nov 21, 8:20 PM
Unknown Object (File)
Wed, Nov 19, 4:39 PM
Unknown Object (File)
Mon, Nov 17, 3:30 PM
Unknown Object (File)
Mon, Nov 10, 10:14 AM
Unknown Object (File)
Mon, Nov 10, 3:23 AM
Unknown Object (File)
Sun, Nov 9, 5:43 PM
Unknown Object (File)
Sun, Nov 9, 3:33 PM
Subscribers

Details

Summary

Use posix_spawn to avoid having to allocate memory needed for the system
command line.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 55980
Build 52869: arc lint + arc unit

Event Timeline

imp requested review of this revision.Feb 13 2024, 4:50 AM
imp created this revision.
sbin/reboot/reboot.c
76

Shouldn't there only be one copy?

95

Check return value? Especially for EINTR.

105–107

Would seem more natural to flip these two cases?

sbin/reboot/reboot.c
76

Oh, yes.

95

Should we look on EINTR? Or just ignore it?

105–107

sure.

This revision is now accepted and ready to land.Feb 15 2024, 11:17 PM
This revision was automatically updated to reflect the committed changes.