From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62187 invoked by alias); 20 Feb 2018 13:58:05 -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 62170 invoked by uid 89); 20 Feb 2018 13:58:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Subject: Re: [PATCH 3/3] Refactor atfork handlers To: Adhemerval Zanella Cc: libc-alpha@sourceware.org References: <1518008967-8310-1-git-send-email-adhemerval.zanella@linaro.org> <1518008967-8310-3-git-send-email-adhemerval.zanella@linaro.org> <88a58530-092d-4daa-1096-97a1bf8e08ff@redhat.com> <7b71dd04-afd0-9ff0-79c3-3d47cbd77ee2@redhat.com> <4aad8145-b06f-4d95-315a-73d5f2253971@linaro.org> <9d8251a8-7604-9846-ebde-409786e2ebf4@redhat.com> <780cefa6-543f-1a04-4b4e-9059a30d211b@linaro.org> <2fc18517-d23d-a298-e458-88ceff1cfc33@linaro.org> From: Florian Weimer Message-ID: <9a266bea-818d-64da-198e-64f1c19a7915@redhat.com> Date: Tue, 20 Feb 2018 13:59:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <2fc18517-d23d-a298-e458-88ceff1cfc33@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2018-02/txt/msg00554.txt.bz2 On 02/20/2018 02:48 PM, Adhemerval Zanella wrote: > The atfork_run_prepare will instruct __run_fork_handlers to take the internal > atfork_lock handler: > > void > __run_fork_handlers (enum __run_fork_handler_type who) > { > struct fork_handler *runp; > > if (who == atfork_run_prepare) > { > lll_lock (atfork_lock, LLL_PRIVATE); > > And it will prevent to add new registration until either the parent or the child > call __run_fork_handlers with either 'atfork_run_child' or 'atfork_run_parent' > to release the lock. Oh, sorry, I missed that. So the patch does not have this problem. This does not settle the deadlock issue, though. Thanks, Florian