Page MenuHomeFreeBSD

pwait: Add a SIGINFO handler
ClosedPublic

Authored by des on Tue, Jul 21, 8:19 PM.
Tags
None
Referenced Files
F164251110: D58386.id182671.diff
Thu, Jul 30, 3:22 AM
F164250818: D58386.id182671.diff
Thu, Jul 30, 3:17 AM
F164228116: D58386.id182420.diff
Wed, Jul 29, 8:52 PM
F164220383: D58386.id182671.diff
Wed, Jul 29, 6:46 PM
F164177086: D58386.id182420.diff
Wed, Jul 29, 9:22 AM
F164163767: D58386.id182671.diff
Wed, Jul 29, 7:02 AM
Unknown Object (File)
Wed, Jul 29, 5:37 AM
Unknown Object (File)
Wed, Jul 29, 4:06 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 74990
Build 71873: arc lint + arc unit

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
252

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
252

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
252

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.