Zsh Mailing List Archive
Messages sorted by:
Re: SIGPIPE (Re: ZSH history not saved anymore)
- X-seq: zsh-workers 33259
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: SIGPIPE (Re: ZSH history not saved anymore)
- Date: Sat, 27 Sep 2014 16:55:54 -0700
- In-reply-to: <email@example.com>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <140926000448.ZM30835@torch.brasslantern.com> <email@example.com> <CABx2=D9xdeJ0qDNayUG0astemFEtK13SLpA3j8UQT5EqHW_PmA@mail.gmail.com> <firstname.lastname@example.org> <CABx2=D-chwqBDZLTk8OqeUDqxvnYUQFFKWbiw7h3ZgUGtSb_CQ@mail.gmail.com> <email@example.com> <140927105301.ZM31550@torch.brasslantern.com> <firstname.lastname@example.org>
On Sep 27, 9:40pm, Peter Stephenson wrote:
} Subject: Re: SIGPIPE (Re: ZSH history not saved anymore)
} On Sat, 27 Sep 2014 10:53:01 -0700
} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
} > I'm a bit hesitant to change this after all these years, but perhaps an
} > interactive shell should exit on SIGPIPE if the terminal is not still open?
} It's hard to see how can that be wrong if we exit on EOF on the terminal.
Ideally we'd know what descriptor caused the SIGPIPE and only exit if it
was the terminal. isatty(SHTTY) is a crude approximation.
} > I'm probably missing something having to do with subshells receiving the
} > PIPE signal.
} I don't know what it is that stops it running zexit() and having the
} same effect in a subshell, hence writing out history incorrectly, if
} that's what you mean, but you may be thinking of something more subtle.
Usually a SIGPIPE is generated by a write on a descriptor whose "other
end" is closed. So I'm wondering if there are cases where a subshell
might get a SIGPIPE on write, in which not only should it not zexit()
but it shouldn't exit at all?
Messages sorted by: