Page MenuHomeFreeBSD

daemon(8): handle case of waitpid() returning without exited child
ClosedPublic

Authored by kib on Mar 18 2024, 8:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 26 2024, 4:02 PM
Unknown Object (File)
Sep 18 2024, 6:24 PM
Unknown Object (File)
Sep 18 2024, 5:29 AM
Unknown Object (File)
Sep 18 2024, 2:43 AM
Unknown Object (File)
Sep 17 2024, 4:00 PM
Unknown Object (File)
Sep 17 2024, 1:39 PM
Unknown Object (File)
Sep 16 2024, 11:40 PM
Unknown Object (File)
Sep 15 2024, 5:46 PM

Details

Summary

Not checking for either WIFEXITED(status) or zero result results in never finishing the loop.

PR: 277764

Diff Detail

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

Event Timeline

kib requested review of this revision.Mar 18 2024, 8:49 AM
This revision is now accepted and ready to land.Mar 18 2024, 2:41 PM

Oh, return () style differs here

tamelingdaniel_gmail.com added inline comments.
usr.sbin/daemon/daemon.c
767

I think you also need to check WIFSIGNALED(status). Otherwise daemon will not finish when the child is killed by a signal.

Check for WIFSIGNALLED.
Un-style return.

This revision now requires review to proceed.Mar 18 2024, 6:28 PM
This revision was not accepted when it landed; it landed in state Needs Review.Mar 20 2024, 1:07 AM
This revision was automatically updated to reflect the committed changes.