in reply to Getting around Win32 limitations

I realized that, my alarm_pg.pm has a problem. I have to add one line, highted below, so that the child process would stop right after the sleep. Otherwise, the child process will just continue to do whatever the program write for his main process. After a while, you will have lots of child processes running, and killing CPU's.
alarm_pg.pm: package pg_alarm; use strict; sub new { shift; my $seconds = shift; my $self = {}; $self->{CHILD_PID} = fork(); if ($self->{CHILD_PID} == 0) { sleep($seconds);

exit;
} bless $self; return $self; } sub alarmed { my $self = shift; my $result = 0; if (defined($self->{CHILD_PID})) { my $ret = waitpid($self->{CHILD_PID}, 1); if ($ret == -1) { $result = 1; } } return $result; }