From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45802 invoked by alias); 18 Sep 2018 01:31:15 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 45442 invoked by uid 89); 18 Sep 2018 01:31:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=my, My, contract, HContent-Transfer-Encoding:8bit X-HELO: hawking.rebel.net.au Subject: Re: [PATCH 2/3] posix: Use posix_spawn on popen To: Rich Felker References: <20180915151622.17789-1-adhemerval.zanella@linaro.org> <20180915151622.17789-2-adhemerval.zanella@linaro.org> <20180917145025.GJ17995@brightrain.aerifal.cx> From: David Newall Cc: Adhemerval Zanella , libc-alpha@sourceware.org Message-ID: <87797b78-a951-f80b-553f-b9e6d208c073@davidnewall.com> Date: Tue, 18 Sep 2018 01:31:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180917145025.GJ17995@brightrain.aerifal.cx> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2018-09/txt/msg00266.txt.bz2 On 18/09/18 00:20, Rich Felker wrote: > The historical contract of vfork is that you can basically do nothing > after it returns in the child except for exec or _exit Yes, that is true.  My  understanding is that vfork was intended only as a fast way of doing fork/exec sequence. > One thing to note is that vfork is completely unsafe to use as > documented if any signal handlers are installed, unless you block all > signals before calling vfork, in which case the exec'd process will > inherit a fully-blocked signal mask which is probably not what you > want. Otherwise signal handlers may wrongly run in the child that's > sharing memory with the parent. You're saying that kernel will deliver a signal to child pid when it was parent pid that was signalled.  Can that really happen?