From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 1F43A3858C83 for ; Wed, 11 Jan 2023 21:06:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1F43A3858C83 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673471198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lPBxnegYIBHXnqmRyvCYsmC7wHJc06TUx6+RUfbTc70=; b=WzIMhZIek1stiBAzxdafz3pDF/vF3QyvkK5nXPgLzvp1Oh8W+BiWA2qGmRfRCQ4+DNgvm4 Behp4bTrTQ298KY8vqxofkV04TVQw9Dq+ZW6wAmPjbTY4x/WfWsgiDNYBHSdNC20mvKL3F sZrYJm27du4PxxF9WUBPMr8XdsS9c8M= Received: from mail-io1-f69.google.com (mail-io1-f69.google.com [209.85.166.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-101-XZdyKW_MMd6Gyxnim7mh4Q-1; Wed, 11 Jan 2023 16:06:36 -0500 X-MC-Unique: XZdyKW_MMd6Gyxnim7mh4Q-1 Received: by mail-io1-f69.google.com with SMTP id w12-20020a5e970c000000b0070450f33abbso5023883ioj.14 for ; Wed, 11 Jan 2023 13:06:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lPBxnegYIBHXnqmRyvCYsmC7wHJc06TUx6+RUfbTc70=; b=6agr8Ktgmu8mrutGFaTrAizm/1YEM0fAw5pAGdt6t0jb6R/H2BKILyGGcxE12+SmNS yqnyc7jc1r0wWUZoI7vpPSUuAKIZ7ZhBdD20TTbXc3e+Ff4i7HymvNntS2Lf8+WKyTbu jDuqOHY5+ONDU2QaCdLPHE5K1RJV1AdKqUuU3o6qVmdddK/tTpRDBpD2lQiofybkdV0D jfsu3zmaSMM5kOwgkNPHiXGxW/aBZFFOyPbpfKCtJf26+lCKuPEJTBXAoA/N0bbB/WSH qzB0y1G/C6nglVp/7M3aYrYNkZ/y60kCLJWpINYhWUmk4z1n3Jrsy4iiWJtHIrIi/3N1 ccEg== X-Gm-Message-State: AFqh2koiOKNSat8G6IHdLMNz6yXSbcqeCmGUnHCBZIx5oV2c6jITL/Kl PzxUPVH/4Xk933wnnNS6BQ6CkHI2S/XhkSIhF2eJI7I+wEaFhBJvvJvKLAyUzKTjrELsmQ/BhLq DFpyiTn6S03XlAc1l4mIr X-Received: by 2002:a05:6e02:1245:b0:30d:b371:380d with SMTP id j5-20020a056e02124500b0030db371380dmr6024855ilq.7.1673471195977; Wed, 11 Jan 2023 13:06:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXvnh1hPrwteBa2gPrgKqFWl528r28OkGJJht2i5cZAPmj44Ej/TL3pJuETmV4bjQ9smHPG3Bw== X-Received: by 2002:a05:6e02:1245:b0:30d:b371:380d with SMTP id j5-20020a056e02124500b0030db371380dmr6024843ilq.7.1673471195700; Wed, 11 Jan 2023 13:06:35 -0800 (PST) Received: from [192.168.0.241] (192-0-145-146.cpe.teksavvy.com. [192.0.145.146]) by smtp.gmail.com with ESMTPSA id x11-20020a927c0b000000b002f1378de8d5sm4571348ilc.40.2023.01.11.13.06.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Jan 2023 13:06:35 -0800 (PST) Message-ID: <09e22a1e-dd0c-a1de-83d6-518b8dbec485@redhat.com> Date: Wed, 11 Jan 2023 16:06:34 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH v2 1/9] linux: Do not reset signal handler in posix_spawn if it is already SIG_DFL To: Adhemerval Zanella , libc-alpha@sourceware.org, Christian Brauner References: <20220930192613.3491147-1-adhemerval.zanella@linaro.org> <20220930192613.3491147-2-adhemerval.zanella@linaro.org> From: Carlos O'Donell Organization: Red Hat In-Reply-To: <20220930192613.3491147-2-adhemerval.zanella@linaro.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 9/30/22 15:26, Adhemerval Zanella via Libc-alpha wrote: > There is no need to issue another sigaction is the disposition is Please post v3 with corrected commit message. s/is the/if the/g > already SIG_DFL. > > Checked on x86_64-linux-gnu. > --- > sysdeps/unix/sysv/linux/spawni.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sysdeps/unix/sysv/linux/spawni.c b/sysdeps/unix/sysv/linux/spawni.c > index ee843a2247..65ee03c804 100644 > --- a/sysdeps/unix/sysv/linux/spawni.c > +++ b/sysdeps/unix/sysv/linux/spawni.c > @@ -129,7 +129,7 @@ __spawni_child (void *arguments) > else > { > __libc_sigaction (sig, 0, &sa); > - if (sa.sa_handler == SIG_IGN) > + if (sa.sa_handler == SIG_IGN || sa.sa_handler == SIG_DFL) OK. Agreed, since we're going to set SIG_DFL and then call sigaction. > continue; > sa.sa_handler = SIG_DFL; > } -- Cheers, Carlos.