Re: Catch pid for a process that created
From: Mav (mluvw47_at_yahoo.com)
Date: 08/20/04
- Previous message: nobull_at_mail.com: "Re: trying out escape characters"
- In reply to: lxrocks: "Re: Catch pid for a process that created"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 20 Aug 2004 13:56:44 -0700
lxrocks <lxrocks@hotmail.com> wrote in message news:<kMFSc.53113$K53.10738@news-server.bigpond.net.au>...
> Mav wrote:
> > Hi,
> > I am writing a perl script on windows that try to get the pid for a
> > program that created another processes.
> >
> > .....
> >
> > @args = ("\"$devPath\\devenv.com\" ..\\Solution\\My.sln /build
> > Debug");
> > $pid = open my $proc, "@args |";
> > ...
> >
> >
> > the $pid will give me the pid for devenv.com; However, the devenv.com
> > actually created another process name devenv.exe, is that a way I can
> > get that pid.
> >
> > Thanks,
> > Mav
> Don't know much about windows, but try the Win32::ToolHelp module.
> It can provide process information.
>
> http://search.cpan.org/~prantl/Win32-ToolHelp-0.2/ToolHelp.pm
That will give me the process devenv.com, but I still cannot get the
devenv.com. The problem I have is when I start my script that will
call devenv.com, however, the devenv.com will call devenv.exe, If I
using Ctrl-C to
stop (or install my SIG handler), I can only kill devenv.com, which
will leave the devenv.exe still running.
Any suggestion?
- Previous message: nobull_at_mail.com: "Re: trying out escape characters"
- In reply to: lxrocks: "Re: Catch pid for a process that created"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|