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
Unknown Object (File)
Tue, Jul 28, 12:30 AM
Unknown Object (File)
Mon, Jul 27, 2:32 PM
Unknown Object (File)
Mon, Jul 27, 7:37 AM
Unknown Object (File)
Mon, Jul 27, 7:25 AM
Unknown Object (File)
Sun, Jul 26, 12:34 AM
Unknown Object (File)
Sat, Jul 25, 4:03 PM
Unknown Object (File)
Sat, Jul 25, 8:10 AM
Unknown Object (File)
Sat, Jul 25, 5:51 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.Sat, Jul 18, 5:35 PM
sys/kern/sys_procdesc.c
488

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

493
kib marked 2 inline comments as done.Sun, Jul 19, 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.Sun, Jul 19, 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.Mon, Jul 20, 12:45 AM
kib marked an inline comment as done.Mon, Jul 20, 1:59 AM