in reply to children don't see ^C ??

I think your problem is (apart from Freudian slips) is that ^C kills the currently running process, subsequently the children are free to go since they are different proccesses. The same thing will happen when anything else kills the parent process too. So you'll want to keep track of your children and then kill them in the signal handler, like so
use strict; my @children = (); $SIG{INT} = sub { kill 15, @children if @children > 0; print STDERR "children sent TERM signal\n"; exit 1; }; if(my $pid = fork()) { push @children, $pid; print "forked off child $pid\n"; } else { print "in child process\n"; }
You'll probably want to put some sleep()s in there to watch it at work, but I'm sure you get the gist of it.
HTH

broquaint

Replies are listed 'Best First'.
Re: Re: children don't see ^C ??
by iza (Monk) on Oct 11, 2001 at 12:44 UTC
    i'll try this right now :))
    thank you very much, it helps a lot :))))
    it's too bad perl can't do anything for freudian slips tho .... ;]