Igor Schein on Tue, 3 Dec 2002 20:32:22 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

trapping signals


Hi,

The following command behaves differently on different platforms:

echo -e '#\n\g5\nfactorint(11111111111111111111111111,6)'|gp 2>&1|awk '/passing/{print;exit}'

This is Bourne shell syntax, it'd be slighty different in csh.

On Linux and Solaris it behaves as expected - prints out the very
first line containing the word "passing" and immediately exits.  On
HPUX it does the same, but in addition gives this:

Pid 5836 received a SIGSEGV for stack growth failure.
Possible causes: insufficient memory or swap space,
or stack size exceeded maxssiz.
sh: 5836 Memory fault

I can live with that for my purpose.  However, on Tru64 it hangs
after printing the line, and I have to use ^\ ( are you listening,
Michael Somos :-) to kill it.

Can anything be done about it?  I guess signal trapping behavior
differs between unices.

Thanks

Igor