* [BUG] zsh fails to resume function
@ 2023-11-29 16:52 Paolo Perego
2023-11-29 18:25 ` Bart Schaefer
0 siblings, 1 reply; 3+ messages in thread
From: Paolo Perego @ 2023-11-29 16:52 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 1631 bytes --]
Hi list, I'm Paolo the zsh maintainer for openSUSE and SLE. A user
reported us a bug, we tracked in our bugzilla instance [1].
It seems zsh fails to re-enter a nested command putted in background
when defined in a function.
I reproduced the bug on a vanilla 5.9 installation, so the bug is not
introduced by any change made downstream.
The followings are the step to reproduced the issue:
% zsh -f
% fc -l 1 -1 2>&1|less +G #enter less without using a function
^Z #suspend less
zsh: done fc -l 1 -1 2>&1 |
zsh: suspended less +G
% fg #zsh re-enters less properly
: q
[1] - done fc -l 1 -1 2>&1 |
continued less +G
% h(){ fc -l 1 -1 2>&1|less +G;}
% h #enter less in a function
^Z #suspend less
zsh: done fc -l 1 -1 2>&1 |
zsh: suspended
% fg #zsh fails to re-enter less
[1] + done fc -l 1 -1 2>&1 |
continued
zsh: done fc -l 1 -1 2>&1 |
zsh: suspended (tty output)
zsh: done fc -l 1 -1 2>&1 |
zsh: suspended (tty output)
%
Can you please confirm that this is a bug for you and give us a link to
backtrack the progress?
Thanks
Paolo
[1] https://bugzilla.suse.com/show_bug.cgi?id=1217304
--
(*_ Paolo Perego @thesp0nge
//\ Software security engineer suse.com
V_/_ 0A1A 2003 9AE0 B09C 51A4 7ACD FC0D CEA6 0806 294B
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [BUG] zsh fails to resume function
2023-11-29 16:52 [BUG] zsh fails to resume function Paolo Perego
@ 2023-11-29 18:25 ` Bart Schaefer
0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2023-11-29 18:25 UTC (permalink / raw)
To: Paolo Perego; +Cc: zsh-workers
(Note, we received this twice as workers/52330 and workers/52331, I'm
responding to 52330.)
On Wed, Nov 29, 2023 at 9:17 AM Paolo Perego <paolo.perego@suse.com> wrote:
>
> It seems zsh fails to re-enter a nested command putted in background
> when defined in a function.
> [...]
> Can you please confirm that this is a bug for you and give us a link to
> backtrack the progress?
This is fixed in current git HEAD by workers/50874 and workers/50922.
https://www.zsh.org/mla/workers/2022/msg01204.html
https://www.zsh.org/mla/workers/2022/msg01252.html
Note the subject of the latter refers to "problem with 'ls | less'
shell function".
In the specific example in your test case, "less" was known to trigger
the bug due to its internal handling of the terminal (stdin/out/err
descriptors) and signals. Thread starts at
https://www.zsh.org/mla/workers/2022/msg01115.html
It might be possible to backport those two patches into your build.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [BUG] zsh fails to resume function
@ 2023-11-29 17:22 Paolo Perego
0 siblings, 0 replies; 3+ messages in thread
From: Paolo Perego @ 2023-11-29 17:22 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 1629 bytes --]
Hi list, I'm Paolo the zsh maintainer for openSUSE and SUSE Linux
Enterprise distributions.
We were reported by a customer, that zsh fails to re-enter a command on
the right side of a pipe when command is suspended and the program combo
is defined in a function.
To make sure no changes from downstream introduced this bug, I
replicated using a vanilla zsh version 5.9 downloaded from zsh.org
mirror.
Since the problem is still present, I wrote to you to fix it upstream.
% zsh -f
% fc -l 1 -1 2>&1|less +G #enter less without using a function
^Z #suspend less
zsh: done fc -l 1 -1 2>&1 |
zsh: suspended less +G
% fg #zsh re-enters less properly
: q
[1] - done fc -l 1 -1 2>&1 |
continued less +G
% h(){ fc -l 1 -1 2>&1|less +G;}
% h #enter less in a function
^Z #suspend less
zsh: done fc -l 1 -1 2>&1 |
zsh: suspended
% fg #zsh fails to re-enter less
[1] + done fc -l 1 -1 2>&1 |
continued
zsh: done fc -l 1 -1 2>&1 |
zsh: suspended (tty output)
zsh: done fc -l 1 -1 2>&1 |
zsh: suspended (tty output)
%
Can you please acknowledge the issue and give me a link to backtrack and
follow fix progress in our systems?
Thank you so much
Paolo
[1] https://bugzilla.suse.com/show_bug.cgi?id=1217304
--
(*_ Paolo Perego @thesp0nge
//\ Software security engineer suse.com
V_/_ 0A1A 2003 9AE0 B09C 51A4 7ACD FC0D CEA6 0806 294B
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-29 18:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-29 16:52 [BUG] zsh fails to resume function Paolo Perego
2023-11-29 18:25 ` Bart Schaefer
2023-11-29 17:22 Paolo Perego
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).