![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| signal handling question | fox_hound_33 | High Level Programming | 7 | 05-31-2008 01:53 PM |
| Signal Handling | themezzaman | High Level Programming | 3 | 07-12-2006 10:05 PM |
| Perl alarm signal | reggiej | Shell Programming and Scripting | 2 | 01-15-2006 04:00 PM |
| signal handling in shell script | Raom | UNIX for Advanced & Expert Users | 4 | 12-08-2005 06:55 AM |
| Handling SIGUSR2 signal | diganta | UNIX for Advanced & Expert Users | 3 | 11-21-2005 11:18 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Guys,
I'm doing signal handling in Perl. I'm trying to catch ^C signal inside the script. There two scripts : one shell script and one perl script. The shell script calls the perl script. For e.g. shell script a.sh and perl scipt sig.pl. Shell script a.sh looks something like this : #!/usr/bin/sh # some code sig.pl # Call perl script. # some more code. Perl script sig.pl looks something like this : #!/usr/bin/perl #some code #signal handling $SIG{'INT'} = 'Handler'; sub Handler { print "Caught ^C \n"; exit (0); } # Some more code. The point is : The signal gets caught in sig.pl, but it doesn't return to a.sh, but instead returns to the command prompt. I need to do more processing in shell script a.sh. I've used die() as well but the result is the same. Does anyone have any idea how to make the perl script return back to the parent shell script after catching the signal. Thanks. |
| Bookmarks |
| Tags |
| linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|