Prepare for program Capsicumization by storing process descriptors instead of pids. Signal delivery is not permitted in capability mode, so we can use pdkill(2) to terminate child processes.
Details
Details
- Reviewers
markj emaste - Commits
- rG95381c0139d6: syslogd: Use process descriptors
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
usr.sbin/syslogd/syslogd.c | ||
---|---|---|
1958–1959 | deadq_enter() saves the process descriptor in the entry, but the subsequent close_filed() call will close the process descriptor, so we're left with a dangling fd. |
Comment Actions
deadq_enter() and close_filed() are now always called together. Should the latter call the former directly? If not, I'd suggest adding a comment to close_filed() explaining that the procdesc is closed elsewhere, otherwise it looks like it's being leaked.