Path: csiph.com!goblin3!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: =?UTF-8?B?T8SfdXo=?= Newsgroups: gnu.bash.bug Subject: Re: process substitution error handling Date: Thu, 6 Aug 2020 16:02:19 +0300 Lines: 46 Approved: bug-bash@gnu.org Message-ID: References: <20200420051508.GA2359844@zx2c4.com> <7496b183-2db3-6c03-6074-928adcd08f45@case.edu> <20200806122418.GW22833@eeg.ccf.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: usenet.stanford.edu 1596718949 31695 209.51.188.17 (6 Aug 2020 13:02:29 GMT) X-Complaints-To: action@cs.stanford.edu To: "bug-bash@gnu.org" Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=n2Bo+FLIZ3t+ob9fWdy9iXK884LcJvc9Va94Tl3AkoY=; b=WpUEY479ls+HGCEg+Wu0IECj+qgPI4XluRJyxtz78sIKJ/60dWPQFDf/q9kkSCl4Lo o9q7db7DbViSJeiRadV8EPlwVA3HSZMB/Qtd2kIyE144egkmaR/X0UGSB6sZbeGk4wVL /YW7/rOXsaIOJ64AMx0UN/0BuGDkm8hdWp0q/x4KZXJb4vCIkkLDYc5TDo2PQzElixOz DIjDJNDdzlFBXONEMTAg1Trak29QNXafrlW5VHCfpHx2qYTmV2BErspwvOxPvDNmGjrE aPB9VO9YTeJKQImD0Pj6kavp0CoQwjYCJVXTKT1qz6chhP32f8y0bxb0JatQqVtmFxlE 4Egw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=n2Bo+FLIZ3t+ob9fWdy9iXK884LcJvc9Va94Tl3AkoY=; b=sqxa2434pbFvZyzlJ5Rl8/3nQFtOBzZzoJRRMIfT38yaC371EA2ugCmC433YKJ/jey SjB7Jifgfl/5vOV3VmOdHN6jSIJRkOjcmebiFtQiTgiGytuML6S487ijr3zhZ926vV/K SZqNpvDK/+8/XeVjGex9MNJ6q1TcfS8x9vC6BuE+NtoHYzsHTO/R9fQSn/lTutV1QSqz y8ZYvAjyN1QfA9U6rVduiG6MNYDA8CsG/jrRPgQhKF8Yj0ea3Xzvnt8hvg91X7pb/Udo yzN8MhKWaGZl2BiCN0aYvhP2HubnO0xLKwG4ImteFimVu6mCE0sY0nSr774OQaQtbuEC dSWw== X-Gm-Message-State: AOAM533PPrOaw6NATzOCFgqkFokAVz5NgyOKYHIZHJMnEgWH1QqmXffG LFAUP+d+bXg9Em4lk0TY9gG3uebKyGk+NUHj4Vp9YASj X-Google-Smtp-Source: ABdhPJwk6nR0qW62g3IG2FBmLCiVDBD/Djioef7Th7neN2nuARmJQUlmswumGR7w7hrHZ6kyz/HF7LznwzW9p047vwo= X-Received: by 2002:ae9:ea13:: with SMTP id f19mr8482678qkg.331.1596718940022; Thu, 06 Aug 2020 06:02:20 -0700 (PDT) In-Reply-To: <20200806122418.GW22833@eeg.ccf.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::730; envelope-from=oguzismailuysal@gmail.com; helo=mail-qk1-x730.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <20200420051508.GA2359844@zx2c4.com> <7496b183-2db3-6c03-6074-928adcd08f45@case.edu> <20200806122418.GW22833@eeg.ccf.org> Xref: csiph.com gnu.bash.bug:16710 6 A=C4=9Fustos 2020 Per=C5=9Fembe tarihinde Greg Wooledge yazd=C4=B1: > On Thu, Aug 06, 2020 at 02:14:07PM +0200, Jason A. Donenfeld wrote: > > On Thu, Aug 6, 2020 at 1:15 PM O=C4=9Fuz wr= ote: > > > set -e o substfail > > > : <(sleep 10; exit 1) > > > foo > > > > > > Say that `foo' is a command that takes longer than ten seconds to > complete, how would you expect the shell to behave here? Should it > interrupt `foo' or wait for its termination and exit then? Or do somethin= g > else? > > > > It's likely simpler to check after foo, since bash can just ask "are > > any of the process substitution processes that I was wait(2)ing on in > > exited state with non zero return?", which just involves looking in a > > little list titled exited_with_error_process_subst for being non-null. > > So, in a script like this: > > set -e -o failevenharder > : <(sleep 1; false) > cmd1 > cmd2 > cmd3 > cmd4 > > They're asking that the script abort at some unpredictable point during > the sequence of commands cmd1, cmd2, cmd3, cmd4 whenever the process > substitution happens to terminate? > > My thoughts exactly. That would be disastrous. > I'm almost tempted to get behind that just to help the set -e users > reach the point of terminal absurdity even faster. The wreckage should > be hilarious. > > --=20 O=C4=9Fuz