Bug 75341 - gnome-terminal starts subprocess with SIGPIPE set to ignore
gnome-terminal starts subprocess with SIGPIPE set to ignore
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: vte (Show other bugs)
8.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Warren Togami
:
: 75213 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-07 10:05 EDT by diego.santacruz
Modified: 2007-04-18 12:47 EDT (History)
1 user (show)

See Also:
Fixed In Version: blah
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-11 07:43:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fix to reenable SIGPIPE in child process just before exec'ing command (836 bytes, patch)
2002-10-08 05:42 EDT, diego.santacruz
no flags Details | Diff

  None (edit)
Description diego.santacruz 2002-10-07 10:05:18 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020809

Description of problem:
gnome-terminal is starting subprocesses with SIGPIPE set to ignore. This causes
problems with shells such as tcsh that don't reset SIGPIPE to the default action
upon starting (on the contrary bash does reset it).
This shows very clearly with the man command that complains under tcsh running
in a gnome-terminal, which complains loudly.

Version-Release number of selected component (if applicable):
gnome-terminal-2.0.1-5

How reproducible:
Always

Steps to Reproduce:
1. set SHELL env. var. to /bin/tcsh (e.g., setenv SHELL /bin/tcsh)
2. run "gnome-terminal --disable-factory" (to start with above SHELL)
3. run "man man"


Actual Results:  man complains with messages:

gunzip: stdout: Broken pipe

grotty:<standard input>:4182:fatal error: output error

Expected Results:  No complains and piped commands work as expected.

Additional info:

Inspecting the SigIgn field of /proc/<pid>/status for the gnome-terminal
process, tcsh and any process started from the tcsh shell it shows that SIGPIPE
is incorrectly set to ignore.

The symptom of this bug is reported as man bug #75213
Comment 1 diego.santacruz 2002-10-08 05:40:46 EDT
I did some more research and it is liblinc and gnome-vfs2 that are setting
SIGPIPE to ignore upon initialization (by calling signal(SIGPIPE,SIG_IGN)).

For linc it is done in linc_init() (linc-0.5.2-2)
For gnome-vfs2 it is done in gnome_vfs_init() and gnome_vfs_postinit()
(gnome-vfs2-2.0.2-5).

The problem is that vte does not reenable SIGPIPE in the forked process before
the exec. I tried just reenabling it in vte and it works fine, although it might
not be the best solution (patch next).
Comment 2 diego.santacruz 2002-10-08 05:42:49 EDT
Created attachment 79324 [details]
Fix to reenable SIGPIPE in child process just before exec'ing command
Comment 3 Nalin Dahyabhai 2002-10-14 17:39:15 EDT
Thanks!  Fixing for 0.9.2 and later.
Comment 4 Havoc Pennington 2003-01-04 14:42:06 EST
*** Bug 75213 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.