From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id BD04438493F1 for ; Tue, 6 Dec 2022 16:53:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BD04438493F1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 06BFF21C35; Tue, 6 Dec 2022 16:53:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1670345633; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=avd/7nU8hMfk7C43JwoYFrgq5PtSdFxS/CoIw5k2Y2o=; b=Bobcy0LZ8n7k5RBUJXiYyFP7i+xauxWup0FGoiyNLPW7WOnSw9ucr2esRdZJlj70FgE2yd wTmyROKRxZYItBb0eXEXGlAXqIgclxb3SblvEULrskEANhGGvfMcyLbSIAXuf3bcTgnQ4B 9xQexAjmIgewmPAgeuzxjCJbJsV9f14= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1670345633; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=avd/7nU8hMfk7C43JwoYFrgq5PtSdFxS/CoIw5k2Y2o=; b=FE1Wmpn9b8r9iAYQLhkJfXwncqWtDkzIJztC8NO6AtoO5iivvUIyIo9gAbA5A9BQ6AA405 uYJqDqG5q04J7fAA== Received: from hawking.suse.de (unknown [10.168.4.11]) by relay2.suse.de (Postfix) with ESMTP id F21D72C141; Tue, 6 Dec 2022 16:53:52 +0000 (UTC) Received: by hawking.suse.de (Postfix, from userid 17005) id ABB5F44012D; Tue, 6 Dec 2022 17:53:52 +0100 (CET) From: Andreas Schwab To: Adhemerval Zanella Cc: libc-alpha@sourceware.org, arnaud.lb@gmail.com Subject: Re: [PATCH] stdio: Do not ignore posix_spawn error on popen (BZ #29016) References: <20221206164503.2534492-1-adhemerval.zanella@linaro.org> X-Yow: Now I need a suntan, a tennis lesson, Annette Funicello and two dozen Day-Glo orange paper jumpsuits!! Date: Tue, 06 Dec 2022 17:53:52 +0100 In-Reply-To: <20221206164503.2534492-1-adhemerval.zanella@linaro.org> (Adhemerval Zanella's message of "Tue, 6 Dec 2022 13:45:03 -0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,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 Dez 06 2022, Adhemerval Zanella wrote: > To correctly return error in case of default shell is not present. Ok. > diff --git a/libio/iopopen.c b/libio/iopopen.c > index 06778cf110..e4be6c9779 100644 > --- a/libio/iopopen.c > +++ b/libio/iopopen.c > @@ -66,11 +66,12 @@ unlock (void *not_used) > be close (by transversing the proc_file_chain list) and the insertion of a > new one after a successful posix_spawn this function should be called > with proc_file_chain_lock acquired. */ > -static bool > +static int > spawn_process (posix_spawn_file_actions_t *fa, FILE *fp, const char *command, > int do_cloexec, int pipe_fds[2], int parent_end, int child_end, > int child_pipe_fd) > { > + int err = 0; I don't think this needs to be initialized here. > diff --git a/stdio-common/tst-popen3.c b/stdio-common/tst-popen3.c > new file mode 100644 > index 0000000000..add5e97c09 > --- /dev/null > +++ b/stdio-common/tst-popen3.c > @@ -0,0 +1,38 @@ > +/* Check if popen return a correct error code if the default shell does not s/return/returns/ > + exists (BZ#29016). s/exists/exist/ -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."