From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by sourceware.org (Postfix) with ESMTPS id DFF0A385DC31 for ; Tue, 29 Jun 2021 19:35:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DFF0A385DC31 Received: by mail-lf1-x133.google.com with SMTP id t17so470648lfq.0 for ; Tue, 29 Jun 2021 12:35:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sy3KOV0jxNkG2i5HSGfkkQ2lw9Iu+xLEEZsvZLOpAho=; b=RWAtvTxnR2Ta66uxJWTYsWosFrW3wWHBeV2RFEg35ZvbWR6PEquXsEf5SaglArTU/c rNJyp601Jg0At98YW4URncTvcAZsjxmwsU/3sOlt9rrGW/fVwVEbuxeVX2wBWIHLXq/J TXpkmUS1RlrGZa0Ntrd+UMYJJGTrVgpQdSumFno89vp0U53xJadR6yR9k1V74386nBsK 0kVIgSMW+6WjalmR4+ejrTt3QVDElWMVMRCI6O87GsaXAMFUSl2v/xZmG2AJb020y83x +W99OdF2LsUdUNlRa+ZKB8m1jM6+DKd02pgrkwkpLNSbPkZkmnFZwnZoZJCq+P/5k2x4 bIag== X-Gm-Message-State: AOAM532XF8u6l6U61VT40Rtmo41qH4Lk3OaN6zlgUFz9rjhxtrGMrSF2 AMLzO8e3kLLeKAKtqJblH7gqN08jjadTu81jpR73FnC9RlY= X-Google-Smtp-Source: ABdhPJwQ1FOK5qyhBXzIx4ZlM+AT3z49voenf+HxpjT96PUudxCmHwjX0EMiNlzAXZdWsMtTY16KpMdiQ6pff6Phxvg= X-Received: by 2002:ac2:4294:: with SMTP id m20mr24568915lfh.6.1624995356635; Tue, 29 Jun 2021 12:35:56 -0700 (PDT) MIME-Version: 1.0 References: <20210617175751.1619846-1-adhemerval.zanella@linaro.org> <20210617175751.1619846-2-adhemerval.zanella@linaro.org> <8552a710-3ae4-8cf2-28a2-cd6dced45abf@linaro.org> <00bab39b-c5d9-25aa-67cf-3d8adedda8e1@linaro.org> In-Reply-To: <00bab39b-c5d9-25aa-67cf-3d8adedda8e1@linaro.org> From: Godmar Back Date: Tue, 29 Jun 2021 15:35:45 -0400 Message-ID: Subject: Re: [PATCH 2/2] posix: Add terminal control setting support for posix_spawn To: Adhemerval Zanella Cc: libc-alpha@sourceware.org X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 19:35:59 -0000 On Tue, Jun 29, 2021 at 1:03 PM Adhemerval Zanella < adhemerval.zanella@linaro.org> wrote: > > OK, I completely forgot that we explicit block *all* signals (including > internals ones) on the helper process to avoid any signal handler (I had > to debug the kernel to remind it): (...) > SO there is no need to handle SIGTTOU here and we already either set the > expected mask or restore the previous defined one just before execve. > Yeah! So it should work. One other thought that occurred to me is that the test program could check that getpgid(getppid()) != getpgrp() to make sure that a new pgrp was actually created. I would love to start using this code before this fix hits the next release. To that end, I'll plan on carving out the corresponding files from the GNU libc source code and place them earlier on the link command line so that they'll get picked up by the linker in lieu of the libc equivalent. I hope this will work.