From ccfb2964726512f6669fea99a43afa714e2e6a80 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 24 Apr 2017 15:50:19 -0300 Subject: posix: Improve default posix_spawn implementation This patch improves the default posix implementation of posix_spawn{p} and align with Linux one. The main idea is to fix some issues already fixed in Linux code, and deprecated vfork internal usage (source of various bug reports). In a short: - It moves POSIX_SPAWN_USEVFORK usage and sets it a no-op. Since the process that actually spawn the new process do not share memory with parent (with vfork), it fixes BZ#14750 for this implementation. - It uses a pipe to correctly obtain the return upon failure of execution (BZ#18433). - It correctly enable/disable asynchronous cancellation (checked on ptl/tst-exec5.c). - It correctly disable/enable signal handling. Using this version instead of Linux shows only one regression, posix/tst-spawn3, because of pipe2 usage which increase total number of file descriptor. * sysdeps/posix/spawni.c (__spawni_child): New function. (__spawni): Rename to __spawnix. --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index e50c5b9494..61f453df7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-06-29 Adhemerval Zanella + + * sysdeps/posix/spawni.c (__spawni_child): New function. + (__spawni): Rename to __spawnix. + 2017-06-29 Florian Weimer * stdio-common/vfprintf.c (group_number): Add front_ptr argument. -- cgit v1.2.3