[progress Communities] [progress Openedge Abl] Forum Post: Re: How To Trap The Signals Sent...

  • Thread starter Thread starter George Potemkin
  • Start date Start date
Status
Not open for further replies.
G

George Potemkin

Guest
In my tests the "trap" setting is NOT inherited by a sub-process even if "trap" is used to ignore the signal. # cat /proc/version Linux version 2.6.32-131.0.15.el6.x86_64 Test: /bin/sh trap "" 1 echo Shell PID1=$$ ps -fp $$ trap /bin/sh echo Shell PID2=$$ ps -fp $$ trap But if a sub-process is started with the brackets () then the "trap" setting IS fully inherited: trap "" 1 echo Shell PID1=$$ ps -fp $$ trap (echo Shell PID2=$$ ps -fp $$ trap sleep 3600 ) BTW, the trap of SIGHUP also traps SIGTERM. It looks like the default action for SIGTERM in the shell is to send SIGHUP to itself.

Continue reading...
 
Status
Not open for further replies.
Back
Top