I have a script test.sh. I am trying to add traps to this script. This script invokes installp. installp takes around 5 mins to complete. After installp i have some 30 lines of shell commands. So when i send a signal like "CTRL+C" when the script is executing installp line, the installp process is stopping. How can i avoid this.
Basically how can i trap a signal sent to parent process shell script when it is executing a child process with out stopping the child process.
Example code:
#!/bin/ksh
trap 'cannot stop the execution' 1 2 3 15
# Do some thing for the next 20 lines
installp -qagcX blah
# Do some more for the next 20 lines.
# End of script
NOw if we send "CTRL+C" in the shell that the above script is being executed when the script is executing installp i want the installp to continue without any problem.
Note:The script may contain some syntax errors.
Any help is appreciated
TIA
kant