Re: Catch pid for a process that created

From: Mav (mluvw47_at_yahoo.com)
Date: 08/20/04

  • Next message: nospam: "How to determine of text matches?"
    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?


  • Next message: nospam: "How to determine of text matches?"

    Relevant Pages

    • VBA Shell function doesnt work
      ... The Shell in VBA in Office X always returns PID 0 and doesn't execute ... I want to run a perl script. ... code works on Windows XP. ... VBA expects Macintosh-style paths using colons, in my case, something ...
      (microsoft.public.mac.office.excel)
    • Re: Catch pid for a process that created
      ... Mav wrote: ... > I am writing a perl script on windows that try to get the pid for a ... > the $pid will give me the pid for devenv.com; ... Don't know much about windows, ...
      (comp.lang.perl)
    • Catch pid for a process that created
      ... I am writing a perl script on windows that try to get the pid for a ... the $pid will give me the pid for devenv.com; ...
      (comp.lang.perl)
    • how to kill a spawned process when it hangs
      ... I run a perl script in which I call an interactive process which is ... # started via these back-tics. ... # How to capture pid of the process started from within those ...
      (comp.unix.shell)
    • Re: How to capture pid
      ... you are getting the parent pid in the perl script. ... you are doing an exec. ...
      (perl.beginners)