Page MenuHomeFreeBSD

procdesc: report NOTE_PDSIGCHLD for traced/stopped process
ClosedPublic

Authored by kib on Sat, Jul 18, 5:35 PM.
Tags
None
Referenced Files
F163447654: D58327.diff
Thu, Jul 23, 7:07 AM
Unknown Object (File)
Wed, Jul 22, 4:07 AM
Unknown Object (File)
Wed, Jul 22, 3:47 AM
Unknown Object (File)
Wed, Jul 22, 3:14 AM
Unknown Object (File)
Tue, Jul 21, 7:43 PM
Unknown Object (File)
Tue, Jul 21, 4:10 AM
Unknown Object (File)
Sun, Jul 19, 6:08 PM
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.Sat, Jul 18, 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.Sun, Jul 19, 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.Sun, Jul 19, 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.Mon, Jul 20, 12:45 AM
kib marked an inline comment as done.Mon, Jul 20, 1:59 AM