Kyle Evans c34a5f16fa posix_spawn(3): handle potential signal issues with vfork
Described in [1], signal handlers running in a vfork child have
opportunities to corrupt the parent's state. Address this by adding a new
rfork(2) flag, RFSPAWN, that has vfork(2) semantics but also resets signal
handlers in the child during creation.

x86 uses rfork_thread(3) instead of a direct rfork(2) because rfork with
RFMEM/RFSPAWN cannot work when the return address is stored on the stack --
further information about this problem is described under RFMEM in the
rfork(2) man page.

Addressing this has been identified as a prerequisite to using posix_spawn
in subprocess on FreeBSD [2].

[1] https://ewontfix.com/7/
[2] https://bugs.python.org/issue35823

Reviewed by:	jilles, kib
Differential Revision:	https://reviews.freebsd.org/D19058
2019-09-25 19:22:03 +00:00
..
2019-09-12 16:45:07 +00:00
2019-02-26 05:59:22 +00:00
2019-04-22 18:38:54 +00:00
2019-07-19 15:10:53 +00:00
2019-05-30 19:18:01 +00:00
2018-11-04 16:08:59 +00:00
2019-02-25 18:22:20 +00:00
2018-10-12 05:27:58 +00:00
2018-09-20 09:26:10 +00:00
2019-09-18 16:13:50 +00:00
2018-09-20 09:31:27 +00:00
2019-08-08 16:54:22 +00:00
2019-04-22 18:38:54 +00:00