Summary: | ptrace(): rfork(RFSPAWN) / posix_spawn() reports fork instead of vfork (+ vfork_done) | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Michał Górny <mgorny> | ||||
Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
Status: | Closed Works As Intended | ||||||
Severity: | Affects Only Me | CC: | emaste, kib, mhorne | ||||
Priority: | --- | ||||||
Version: | CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
PL_FLAG_VFORKED is the modifier for PL_FLAG_FORKED so they are reported both. In your test program, 0x448 is reported in pl_flags, which means SCX | FORKED | VFORKED. Ah, indeed. I wonder why regular vfork() has shown up as vfork in my original program but I guess doesn't matter. Sorry for the mistake. |
Created attachment 223168 [details] reproducer If the debugged program executes rfork(RFSPAWN) or posix_spawn(), the first SIGTRAP signal reports PL_FLAG_FORKED instead of PL_FLAG_VFORKED. This is followed by PL_FLAG_VFORK_DONE, so I guess PL_FLAG_VFORKED was desired. I'm attaching a simple reproducer. Confirmed on 14.0-CURRENT from end of January.