zsh-workers
 help / color / mirror / code / Atom feed
From: "Sean C. Farley" <sean+dev@farley.org>
To: zsh-workers@zsh.org
Subject: Unable to restore suspended function
Date: Thu, 25 May 2023 23:30:56 -0400 (EDT)	[thread overview]
Message-ID: <b2a87d75-91e4-56cc-1cf4-c0e25c6787d7@farley.org> (raw)

I have a simple function to page output of ls.  With Zsh 5.8.1 (and 
earlier), I could suspend it then restore it with fg.  With Zsh 5.9, it 
enters some odd state where I have to call fg a few times before it 
exits (FreeBSD).  It never restores less.  I tested this with FreeBSD 
and Linux.  It works as expected with both FreeBSD's sh and bash.

Test environment (bare bones with no Zsh files in /tmp/zsh):
mkdir /tmp/zsh
env -i ZDOTDIR=/tmp/zsh TERM=${TERM} HOME=${HOME} USER=${USER} zsh
pll() { /bin/ls -lF "${@}" | less; }

Test output (FreeBSD):
% pll /tmp/zsh
total 0
(END)
---- Ctrl+z ----
zsh: done       /bin/ls -lF "${@}" |
zsh: suspended
% fg
[1]  + done       /bin/ls -lF "${@}" |
        continued
zsh: done                    /bin/ls -lF "${@}" |
zsh: suspended (tty output)
zsh: done                    /bin/ls -lF "${@}" |
zsh: suspended (tty output)
% fg
(END)zsh: done                   /bin/ls -lF "${@}" |
zsh: suspended (tty input)
zsh: done                   /bin/ls -lF "${@}" |
zsh: suspended (tty input)
% fg
[1]  + done       /bin/ls -lF "${@}" |
        continued
zsh: done                    /bin/ls -lF "${@}" |
zsh: suspended (tty output)
zsh: done                    /bin/ls -lF "${@}" |
zsh: suspended (tty output)
% fg
[1]  + done       /bin/ls -lF "${@}" |
        continued

Linux is similar but never exits.  It just outputs the "tty output" 
blocks each time fg is called.

Sean
-- 
sean+dev@farley.org


             reply	other threads:[~2023-05-26  3:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-26  3:30 Sean C. Farley [this message]
2023-05-26 19:39 ` Bart Schaefer

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=b2a87d75-91e4-56cc-1cf4-c0e25c6787d7@farley.org \
    --to=sean+dev@farley.org \
    --cc=zsh-workers@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).