From patchwork Sat Dec 26 14:13:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 41557 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EA0743857036; Sat, 26 Dec 2020 14:13:45 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from hera.aquilenet.fr (hera.aquilenet.fr [IPv6:2a0c:e300::1]) by sourceware.org (Postfix) with ESMTPS id A5CA03857036 for ; Sat, 26 Dec 2020 14:13:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A5CA03857036 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=samuel.thibault@ens-lyon.org Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id E1D213F4; Sat, 26 Dec 2020 15:13:41 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m0qgo3V5s5kb; Sat, 26 Dec 2020 15:13:41 +0100 (CET) Received: from function.youpi.perso.aquilenet.fr (2a01cb008800c5009eb6d0fffe88c3c7.ipv6.abo.wanadoo.fr [IPv6:2a01:cb00:8800:c500:9eb6:d0ff:fe88:c3c7]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 2247579; Sat, 26 Dec 2020 15:13:41 +0100 (CET) Received: from samy by function.youpi.perso.aquilenet.fr with local (Exim 4.94) (envelope-from ) id 1ktAKB-0005xX-Os; Sat, 26 Dec 2020 15:13:39 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Subject: [hurd,commited] hurd: Try shell in posix_spawn* only in compat mode Date: Sat, 26 Dec 2020 15:13:39 +0100 Message-Id: <20201226141339.22864-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_NEUTRAL, 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 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: , Cc: commit-hurd@gnu.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Reported by Bruno Haible --- sysdeps/mach/hurd/spawni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/mach/hurd/spawni.c b/sysdeps/mach/hurd/spawni.c index 178b271e4e..2aeed683fe 100644 --- a/sysdeps/mach/hurd/spawni.c +++ b/sysdeps/mach/hurd/spawni.c @@ -838,7 +838,7 @@ __spawni (pid_t *pid, const char *file, err = exec (execfile); __mach_port_deallocate (__mach_task_self (), execfile); - if (err == ENOEXEC) + if ((err == ENOEXEC) && (xflags & SPAWN_XFLAGS_TRY_SHELL) != 0) { /* The file is accessible but it is not an executable file. Invoke the shell to interpret it as a script. */