From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id E834020248 for ; Wed, 17 Apr 2019 19:05:55 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=TsOpwPn/iiWxL+MU 7zfjQTRxdLJhVME8j5w7Bg+eZ2PvVJdH/ltvD5YU0GCK4q3yhow7jFaafO8nla7S Zp9y5jiXSixOVak4+iIkr97iQD35m3SpM68++MMVSvfRx7GAF3ONIGI7uMT6B8dy zjXuKI+B4+Cx7oLdqpygdaUrDfs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=RzjOzKLCYrG4YDo1apQV2y oWIqE=; b=J4Mvk5CYF36lDbbKig2Q2nvRsQQWFynPD1gWhRLAxODlSRXK+qZHIu WQD5Pr6OWArMsH4YnU73Z0Nhi1lybgkaZeqh7gkuyJ9c81chGikgHhT8UCZseeJD mEQ+54Oo2QaLcVVy/PzwQ5wIfDu2EL6WnGkMDbHaZ6Kxxi37hN1Aw= Received: (qmail 99730 invoked by alias); 17 Apr 2019 19:05:53 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 99721 invoked by uid 89); 17 Apr 2019 19:05:53 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-vk1-f194.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=RG+DDXs9h716K22ZkdupWa8W6zbzKEhr5S160CLRsoM=; b=raLH07Zh90cdRRLcvZevtKO6+9mVwyk8lIbgUm8tJ/XzmmhVTKHH+HEQGh5RGuQZ3L PFj4Ke++Ti5GMappJCgKD6y99vhrIWJKzYtZ/dgVGSGCUY2waKRr0M9PaHSMIP8W/SPx s/dSMWNv4Q4yAM1hfX+KTSCmq9cf9oMS53OQ4vRoaWuKi3D7vm9F+/RUmSth6g5ZxmRW JQMZpxJOjqMMsGQmRjGdzg+tcVHeyfknIQCYGPVCAz7dq1ph6elqmTI7VhPE0rY2sepS 0+9k2tWcm66TI56NiRPbl2PzSPeaawteWebE+phGshwskVOONbBG8rV2vAlFsv4/5V8M V+2Q== Subject: Re: [PATCH] manual: don't ignore SIGCHLD when calling waitpid To: libc-alpha@sourceware.org References: From: Adhemerval Zanella Openpgp: preference=signencrypt Message-ID: <4498cfca-28d0-f868-b46c-562050447bf5@linaro.org> Date: Wed, 17 Apr 2019 16:05:47 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit My understanding of the example is for interactive shells (shell_is_interactive), the idea is only to get child information to the explicit launched processes done by launch_process, so ignoring and reseting SIGCHLD seems ok. On 17/04/2019 15:34, Simon Ser wrote: > Hi, > > Could anyone review this? I can't find a maintainer to Cc on the wiki. > > Thanks, > > Simon Ser > > On Thursday, January 17, 2019 4:35 PM, Simon Ser wrote: >> From: emersion >> >> If SIGCHLD is ignore, child process information is discarded as soon as they >> exit, making it impossible to retrieve their status with waitpid. >> --- >> ChangeLog | 4 ++++ >> manual/job.texi | 2 -- >> 2 files changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/ChangeLog b/ChangeLog >> index 4c34d45a..661d2749 100644 >> --- a/ChangeLog >> +++ b/ChangeLog >> @@ -1,3 +1,7 @@ >> +2019-01-17 Simon Ser >> + >> + * manual/job.texi: don't ignore SIGCHLD when calling waitpid >> + >> 2019-01-16 Paul A. Clarke >> >> * sysdeps/powerpc/powerpc64/multiarch/strncmp.c: Fix #ifdef. >> diff --git a/manual/job.texi b/manual/job.texi >> index 05a42ea8..0fc7f51a 100644 >> --- a/manual/job.texi >> +++ b/manual/job.texi >> @@ -414,7 +414,6 @@ init_shell () >> signal (SIGTSTP, SIG_IGN); >> signal (SIGTTIN, SIG_IGN); >> signal (SIGTTOU, SIG_IGN); >> - signal (SIGCHLD, SIG_IGN); >> >> /* @r{Put ourselves in our own process group.} */ >> shell_pgid = getpid (); >> @@ -530,7 +529,6 @@ launch_process (process *p, pid_t pgid, >> signal (SIGTSTP, SIG_DFL); >> signal (SIGTTIN, SIG_DFL); >> signal (SIGTTOU, SIG_DFL); >> - signal (SIGCHLD, SIG_DFL); >> @} >> >> /* @r{Set the standard input/output channels of the new process.} */ >> -- >> 2.20.1