From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20989 invoked by alias); 5 May 2018 16:12:07 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23386 Received: (qmail 24523 invoked by uid 1010); 5 May 2018 16:12:07 -0000 X-Qmail-Scanner-Diagnostics: from mail-oi0-f42.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.218.42):SA:0(-1.9/5.0):. Processed in 3.703059 secs); 05 May 2018 16:12:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | 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 :cc; bh=tl/eSL1hzmJKeWzUDm8PBN4bS2dUS5pE4aHsmdJQWys=; b=Le/IBlXM81yJkEc9N89X8aiOZLGXkMJmYqLJO2xM8ALttsQ7+n2dHwKx1GeIcMElnV U+OqRNcQN0UYz0o62izGDhzKIrmqCDRvfbsN4edMQbb/kA2FLZU+AzcNiwTa85QK3/Th W7wpzrJLqyl1Rt/hlZJISh91xvyE8nFYcNd1WUj2Tw1qpxI+pj6mJbkVO4on4qZRKvWV HzjftLWyb00BucyUkOhOLDcDfBk2F067hTQJfW+6seZYxtYl0gV0IfsxUbY2kANI39bm uLj5H+3ynDmqC8EHpNj5UWGlL1KQLuo44NnP3YLuGCaWKexCIF4j9ptvHEyLsCsYKXI0 dEGw== 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:cc; bh=tl/eSL1hzmJKeWzUDm8PBN4bS2dUS5pE4aHsmdJQWys=; b=JUj5HB9WHJUnVvD3kFjHilih8DdwULbZZsp81mCWCkBxx86jUgT9i5V+QpYex0g59y 08lGWsG3hgvMVUcPF2MNKrbDyzxu6F56wLsgt1VcdjpugXsnwdiH3C++yRj5e/D5ZUsN dh/cJ4Cna7+1msVDeKBzuED97jZuVEcHRNlseNbDd3nALBRihXdXvETFl2zhZtVZglAs Xfu2oBRYrjJbX8rPQIhN+oHKLBsaPYB9GCsNiVWZSIeJf50GhS4EI295Uy16atViHm1T 7zZMikgkl2RZ5OtooCFGBEs+d0ET2OHCIDAa7dM5ZwvFjz4LXkBCZdoMArc6H74OEiDu +5xA== X-Gm-Message-State: ALQs6tCMZgDtKMn/5nyiCLTAuwONaRNx9t+huBnKWtIQGA7PnP3Lcp71 LSHWAmFIZzcVv52BANguZFfDuGMLjmF1fiB4nu7Jjw== X-Google-Smtp-Source: AB8JxZqFNaxwwG6sIoHUzGUaFAdPxhnWjGy6RvJVM8nUyUr/MXk2aBBZSl0Oc5eFLi8O/B0TC7Jg9pMEdW6cQECZw38= X-Received: by 2002:aca:5bc5:: with SMTP id p188-v6mr18045627oib.295.1525536721325; Sat, 05 May 2018 09:12:01 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20180505151054.k4iwezfirs3uemsk@tarpaulin.shahaf.local2> References: <20180505151054.k4iwezfirs3uemsk@tarpaulin.shahaf.local2> From: Sebastian Gniazdowski Date: Sat, 5 May 2018 18:11:41 +0200 Message-ID: Subject: Re: Suppress print_exit_value for single function To: Daniel Shahaf Cc: Zsh Users Content-Type: multipart/alternative; boundary="0000000000005dd318056b77b20a" --0000000000005dd318056b77b20a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On 5 May 2018 at 17:10, Daniel Shahaf wrote: > (Right? I haven't tested this, I'm just going by your description) > It has a basic practical meaning: feature of various prompts to show a skull or some red or other indicator of last command ending with error stops working when sched function always returns 0. So, isn't the answer to that to teach the C code not to write the return > value > of a sched function to the global value of $? =E2=80=94 but to keep print= ing > printexitvalue warnings for sched functions? > I wrote 2 plugins that resulted in user reporting this problem (printexitvalue spam). The aim at "user might want reports from background tasks" is problematic when it's noticed that background tasks malform foreground $? value. It is possible to suppress this malforming (local ret=3D$? at sched function start, return $ret at the end), but then it's no= t sched's function own return code, it's repeated foreground $? code, so it shouldn't be reported. I think proper resolution of this is treating $? value as sacred. We already are steps back from this status of $? as various plugins run background code and just return 0. Teaching functions to not write to $? at C level seems to be very rebellious. Best regards, Sebastian Gniazdowski --0000000000005dd318056b77b20a--