On Wed, Nov 23, 2016 at 10:54:56AM +0100, Martin Natano wrote: > On Tue, Nov 22, 2016 at 04:21:58PM +0100, Marc Espie wrote: > > I'm pretty sure you have something funky in your shell, > > I've been able to reproduce this finally. > > > > $ trap "" PIPE > > $ $ pkg_add -nuix screen-- > > quirks-2.270 signed on 2016-11-21T13:44:48Z > > Error from > > http://ftp.fr.openbsd.org/pub/OpenBSD/snapshots/packages/amd64/screen-4.0.3p6.tgz > > signify: write to stdout: Broken pipe > > Error from > > http://ftp.fr.openbsd.org/pub/OpenBSD/snapshots/packages/amd64/screen-4.0.3p6-shm.tgz > > signify: write to stdout: Broken pipe > > > > which is more or less what you see... > > > > somehow you've got a shell with PIPE deleted, and perl inherits it... > > > > Thank you for investigating! I believe this is not caused by my shell > config, but the X window manager I use (spectrwm). My .profile is > standard except for setting PS1, EDITOR, PAGER, HISTFILE and some > aliases. Spectrwm on the other hand does signal(SIGPIPE, SIG_IGN) and > doesn't reset the signal handlers before spawning a terminal with > execvp(). That would explain why SIGPIPE is ignored in a plain xterm, > but not in the console and in tmux, which does clear the signals before > spawning a new process. Oh my. >
Thinking some more, I'm pretty sure this should also be fixed at the shell level. I see nothing in POSIX that says the shell ought to provide non default handlers for these signals through, as opposed to make(1) which has a full paragraph devoted to possibly ignoring signals.
