Page MenuHomeFreeBSD

pwait: Add a SIGINFO handler
ClosedPublic

Authored by des on Tue, Jul 21, 8:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Aug 10, 10:12 AM
Unknown Object (File)
Mon, Aug 10, 9:46 AM
Unknown Object (File)
Mon, Aug 10, 9:35 AM
Unknown Object (File)
Mon, Aug 10, 12:38 AM
Unknown Object (File)
Sun, Aug 9, 5:21 PM
Unknown Object (File)
Sun, Aug 9, 2:04 PM
Unknown Object (File)
Sun, Aug 9, 9:30 AM
Unknown Object (File)
Sun, Aug 9, 9:20 AM
Subscribers

Details

Summary

On SIGINFO, print a space-separated list or remaining processes to
standard error.

MFC after: 1 week
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.Tue, Jul 21, 8:19 PM
This revision is now accepted and ready to land.Wed, Jul 22, 1:17 AM
des edited the summary of this revision. (Show Details)

update documentation

This revision now requires review to proceed.Wed, Jul 22, 8:17 AM
This revision is now accepted and ready to land.Thu, Jul 23, 3:44 PM

use kevent() instead of a signal handler

This revision now requires review to proceed.Sat, Jul 25, 12:57 PM
bin/pwait/pwait.c
248

This is unreliable. We activate the signal knotes before even checking for the fact that the signal could be ignored. This allows more than one signal events to be lumped together.

I think that the existing mechanism is better.

bin/pwait/pwait.c
248

So what does the event look like if two signals are delivered simultaneously? The exiting mechanism was unfixably unreliable because there is no pkevent() so it was possible for SIGINFO to be delivered outside the kevent() call and be missed until after the next one returned.

bin/pwait/pwait.c
248

No, I was wrong. there is per-signal knotes. The knote list is shared with the EVFILT_PROC filter, but individual signals are counted separately. So for curproc, using the EVFILT_SIGNAL should be fine.

des marked 2 inline comments as done.Mon, Jul 27, 10:14 AM
This revision was not accepted when it landed; it landed in state Needs Review.Mon, Jul 27, 10:17 AM
This revision was automatically updated to reflect the committed changes.