zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: SIGPIPE (Re: ZSH history not saved anymore)
Date: Sat, 27 Sep 2014 16:55:54 -0700	[thread overview]
Message-ID: <140927165554.ZM32155@torch.brasslantern.com> (raw)
In-Reply-To: <20140927214035.7af22023@pws-pc.ntlworld.com>

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@brasslantern.com> 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?


  reply	other threads:[~2014-09-27 23:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87mw9qdp7s.fsf@thinkpad-t440p.tsdh.org>
     [not found] ` <20140924200710.2f764272@pws-pc.ntlworld.com>
     [not found]   ` <8738bg2n1v.fsf@thinkpad-t440p.tsdh.org>
     [not found]     ` <140926000448.ZM30835@torch.brasslantern.com>
     [not found]       ` <878ul6lrw9.fsf@thinkpad-t440p.tsdh.org>
     [not found]         ` <CABx2=D9xdeJ0qDNayUG0astemFEtK13SLpA3j8UQT5EqHW_PmA@mail.gmail.com>
     [not found]           ` <87y4t66td0.fsf@thinkpad-t440p.tsdh.org>
     [not found]             ` <CABx2=D-chwqBDZLTk8OqeUDqxvnYUQFFKWbiw7h3ZgUGtSb_CQ@mail.gmail.com>
     [not found]               ` <871tqxqyil.fsf@thinkpad-t440p.tsdh.org>
2014-09-27 17:53                 ` Bart Schaefer
2014-09-27 20:40                   ` Peter Stephenson
2014-09-27 23:55                     ` Bart Schaefer [this message]
2014-09-28 18:04                       ` Bart Schaefer
2014-09-28 18:18                         ` Peter Stephenson
2014-09-28 20:16                           ` Bart Schaefer
2014-09-29  8:45                             ` Peter Stephenson
2014-09-29 15:29                               ` 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=140927165554.ZM32155@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --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).