in reply to running a loop in background...
Update wog reminded me kill needed a signal passed!my $child; unless($child = fork()) { open (FH, "$statusfile") or die "Unable to open file: $!"; my $DELAY = 5; for(;;) { while(<FH>) { print; } sleep $DELAY; seek(FH, 0, 1); } } # continue with main program kill(15, $child); #when you want it to stop
- Ant
- Some of my best work - Fish Dinner
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: running a loop in background...
by Anonymous Monk on Sep 11, 2001 at 00:10 UTC | |
by idnopheq (Chaplain) on Sep 11, 2001 at 00:21 UTC | |
by tye (Sage) on Sep 11, 2001 at 00:53 UTC | |
by suaveant (Parson) on Sep 11, 2001 at 00:15 UTC |