On Fri, Nov 28, 2008 at 07:53:58PM +0100, Michael Lampe wrote:
> If a Program is started from within fvwm 2.5.26 by 'Exec', it inherits
> $SIG{PIPE}=IGNORED (in Perl speak) from fvwm. This is particularly
> annoying in the chain fvwm -> xterm -> tcsh, as xterm doesn't change it
> and tcsh takes it as documented. (tcsh man page: "... signals have the
> values which the shell inherited from its parent.")
>
> In the end this results in very strange errors for shell pipes, like
> "gunzip: stdout: Broken pipe" (several times) when you display man
> pages, etc.
>
> One might argue that this is xterm's fault because gnome-terminal or
> konsole fix this themselves, or tcsh's fault as bash also rectifies
> things itself.
>
> On the other hand, no other windows manager (I've tested kwm, metacity,
> and mwm) does this strange thing. Therefore I suggest that it should be
> fixed in fvwm.
This isn't strange but a very common thing. *Every* application
should be prepared to reset their signal handlers during startup.
Failing that, it's good to reset signal handlers in the excuting
program. I'll commit a WifxW for this.
> To reproduce this behaviour even if tcsh is not your default shell, from
> within any X terminal emulator type either
>
> perl -e '$SIG{PIPE}="DEFAULT"; exec("xterm -e tcsh")'
>
> or
>
> perl -e '$SIG{PIPE}="IGNORE"; exec("xterm -e tcsh")'
>
> and then
>
> man gcc
>
> from the xterm. The first line gives a properly working shell, the
> second one a shell that is as broken as it would be if started by fvwm
> via 'Exec xterm'.
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt