in reply to Re: signal trapping
in thread signal trapping
The calling script contains the following:#!/usr/bin/perl -w sub my_sig_int_handler { open (OUT,">info.txt"); print OUT "Woo-Hoo!\n"; close(OUT); } $SIG{INT} = \&my_sig_int_handler; print "process $$\n"; while(1){}
when I launch the second script, the orginal one quits but does not capture the interrupt in order to create the output file. Show me what you did.#!/usr/bin/perl -w $process = shift; kill 'INT', $process;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re3: signal trapping
by dragonchild (Archbishop) on Sep 28, 2001 at 23:25 UTC | |
by Seshouan (Acolyte) on Sep 28, 2001 at 23:29 UTC | |
by IDStewart (Acolyte) on Sep 28, 2001 at 23:54 UTC |