Page MenuHomeFreeBSD

procdesc: report NOTE_PDSIGCHLD for traced/stopped process
ClosedPublic

Authored by kib on Jul 18 2026, 5:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Aug 17, 11:17 AM
Unknown Object (File)
Sun, Aug 16, 12:08 PM
Unknown Object (File)
Sat, Aug 15, 5:08 PM
Unknown Object (File)
Thu, Aug 13, 8:14 PM
Unknown Object (File)
Sun, Aug 9, 1:18 PM
Unknown Object (File)
Sun, Aug 9, 9:27 AM
Unknown Object (File)
Sun, Aug 9, 4:56 AM
Unknown Object (File)
Sun, Aug 9, 3:43 AM
Subscribers

Details

Summary
on attach of the knote.  It is same as for NOTE_EXIT when attaching to
the exiting process.

Diff Detail

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

Event Timeline

kib requested review of this revision.Jul 18 2026, 5:35 PM
sys/kern/sys_procdesc.c
504

The code is just checking whether the proc is stopped, it might not be traced.

510
kib marked 2 inline comments as done.Jul 19 2026, 6:42 PM
kib added inline comments.
sys/kern/sys_procdesc.c
504

P_STOPPED_TRACE means that the process is traced (and stopped in ptracestop()).
Checking P_STOPPED_TRACE might be redundant, but I think it is more correct to check.

sys/kern/sys_procdesc.c
504

I mean, we will generate an event if just P_STOPPED_SIG is set. In that case, the process might not be traced.

kib marked an inline comment as done.

Use atomic to load p_flag.

kib marked an inline comment as done.Jul 19 2026, 6:52 PM
kib added inline comments.
sys/kern/sys_procdesc.c
504

I added 'stopped or traced'.

kib marked an inline comment as done.

Update comment.

markj added inline comments.
sys/kern/sys_procdesc.c
504
This revision is now accepted and ready to land.Jul 20 2026, 12:45 AM
kib marked an inline comment as done.Jul 20 2026, 1:59 AM