On Mon, 05 Apr 2010, Octavian Rasnita wrote: > I have tried for too many times with wrong results, so I doubt that exactly > that process ID gets used each time. > > But I have tried the following program which always work: > > use Win32::Process::Info; > > my $pid = 3272; > > my @pids = Win32::Process::Info->new->ListPids; > > print grep($_ == $pid, @pids) ? 'yes' : 'no';
Not sure what you are trying to say here. Are you saying that kill(0, $pid) will return '1' for *any* value of $pid? If you want to check the PID against the current PID, please use the $$ variable for the PID of the Perl process. Beyond that you need to provide additional information, like which version of Windows you are using; if you are running as Administrator or not, etc... It would also help if you could try to reproduce the problem on a separate system, if you have access to more than one. Cheers, -Jan _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
