Bug 123 - Restore default SIGPIPE handler in children
: Restore default SIGPIPE handler in children
Status: NEW
Product: TORQUE
pbs_mom
: 2.4.x
: PC Linux
: P5 enhancement
Assigned To: Ken Nielson
:
:
:
  Show dependency treegraph
 
Reported: 2011-04-20 11:35 MDT by Ari Pollak
Modified: 2011-04-20 11:35 MDT (History)
1 user (show)

See Also:


Attachments


Note

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


Description Ari Pollak 2011-04-20 11:35:10 MDT
It seems that jobs running under pbs_mom have the SIGPIPE handler ignored,
which can cause "broken pipe" errors from a simple "zcat test.gz | head", where
that wouldn't cause any errors under normal circumstances. 

It looks like this is caused by the following line in mom_main.c, which is
presumably still needed:

  sigaction(SIGPIPE, &act, NULL);                                  

So can the default signal handler (SIG_DFL) for SIGPIPE be restored in the
subprocess that spawns the job? It's not possible to do this from within shell,
though it is possible to do it from Python and other scripting languages.