Scan the output of this - you get the process ID and open directories of all programs - look for "perl".
Now comes the ticky part - Perl has already closed your particular program, but it has the working directory Open. If you can identify your perl code based on the working directory, you can use this method. Basically, all you need to do is to place the program in a directory with no other perl code. Then, if you see that directory opened by Perl, you know the program is running.
Like I said before - this is kludgy, but easy to implement. Here is sample output from "handle:".
---------------------------------------------------------------------- +-------- cmd.exe pid: 2948 MyDomain\MyUserID c: File G:\WINDOWS\system32 54: Section \BaseNamedObjects\ShimSharedMemory 58: File G:\Documents and Settings\BLAH\test\handleout.txt ---------------------------------------------------------------------- +-------- ... ---------------------------------------------------------------------- +-------- perl.exe pid: 4008 MyDomain\MyUserID 110: File G:\Documents and Settings\MyDir\test ---------------------------------------------------------------------- +--------
In reply to Re: Check If Active
by NetWallah
in thread Check If Active
by Red_Dragon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |