From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Suppress print_exit_value for single function
Date: Sat, 5 May 2018 18:11:41 +0200 [thread overview]
Message-ID: <CAKc7PVCu8MCysWfGJpxVWmug3NGxnFRgSdG41bMET+N+OTjh4A@mail.gmail.com> (raw)
In-Reply-To: <20180505151054.k4iwezfirs3uemsk@tarpaulin.shahaf.local2>
[-- Attachment #1: Type: text/plain, Size: 1310 bytes --]
On 5 May 2018 at 17:10, Daniel Shahaf <d.s@daniel.shahaf.name> 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 $? — but to keep printing
> 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=$? at sched function start, return $ret at the end), but then it's not
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
prev parent reply other threads:[~2018-05-05 16:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-29 18:42 Sebastian Gniazdowski
2018-04-29 19:02 ` Bart Schaefer
2018-04-30 2:21 ` Sebastian Gniazdowski
2018-04-30 2:23 ` Sebastian Gniazdowski
2018-05-04 16:29 ` Sebastian Gniazdowski
2018-05-05 15:10 ` Daniel Shahaf
2018-05-05 16:11 ` Sebastian Gniazdowski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKc7PVCu8MCysWfGJpxVWmug3NGxnFRgSdG41bMET+N+OTjh4A@mail.gmail.com \
--to=sgniazdowski@gmail.com \
--cc=d.s@daniel.shahaf.name \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).