[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] job.c: implementing child_execute_job() using posix_spaw

From: Barath Aron
Subject: Re: [PATCH 2/2] job.c: implementing child_execute_job() using posix_spawn(), and use it if present
Date: Mon, 30 Jul 2018 12:30:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 07/30/2018 12:21 PM, Paul Smith wrote:
This weekend I reworked the handling of failures in child_execute_job()
so that it behaves properly even when the child failure happens in the
current process (e.g., the fork() or posix_spawn()).

It needs a bit of cleanup--in particular writing a test is complicated
by the fact that errors currently have different formats when built
with fork() vs. posix_spawn().  I need to decide if I want to align
them or fix the test to understand the difference.

I also added a configure --disable-posix-spawn option for those who
want to continue to use fork()/vfork() even when posix_spawn() is
Perfect. I can't wait to try it. :)
  Since there's one missing bit of functionality in the
posix_spawn() case (resetting the stack size in the child) and I don't
think that using posix_spawn() buys you much if anything over vfork()
in GNU/Linux, at least.
Yeah, that stuff is missing. The specification [1] does not tell anything about the stack size (and limits in general), but I think I read in some manual that limits will not be reset. So the only possible implementation will be reset the stack in the current process, spawn, and set the stack size again. Which sounds quite odd to me, thus I didn't implemented this.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_spawn.html

reply via email to

[Prev in Thread] Current Thread [Next in Thread]