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)
Wed, Sep 16, 7:28 AM
Unknown Object (File)
Fri, Sep 11, 7:47 AM
Unknown Object (File)
Thu, Sep 10, 10:05 PM
Unknown Object (File)
Thu, Sep 10, 5:17 PM
Unknown Object (File)
Thu, Sep 10, 2:28 PM
Unknown Object (File)
Thu, Sep 10, 1:28 PM
Unknown Object (File)
Thu, Sep 10, 11:11 AM
Unknown Object (File)
Thu, Sep 10, 8:13 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 Skipped
Unit
Tests Skipped

Event Timeline

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

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

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

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
488

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
488

I added 'stopped or traced'.

kib marked an inline comment as done.

Update comment.

markj added inline comments.
sys/kern/sys_procdesc.c
488
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