This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: problems in Perl process management
- From: Sonam Chauhan <sonam dot chauhan at ce dot com dot au>
- To: "'cygwin at cygwin dot com'" <cygwin at cygwin dot com>
- Date: Wed, 11 May 2005 13:19:14 +1000
- Subject: RE: problems in Perl process management
Hello to Reini Urban and Yitzchak Scott-Thoennes if you're seeing this.
Reine, Yitzchak - Back in Feb, you had a discussion:
http://sourceware.org/ml/cygwin/2005-02/msg00224.html
Do you think the issue below is related to it? Also, at that time Yitzchak
had proposed a patch - do you know what the status of that is?
Jurgen - I think this is not a Windows problem but a Perl/Cygwin problem.
Our experiences may be related. How do you determine the grandchild PID -
was it returned by fork, or did you use the Proc::Killfam and
Proc::ProcessTable Perl modules? I use these modules for convenience and
some debug code showed that they simply do not recognize the grandchildren
as sub-children of the parent PID. The reason is probably the issue
mentioned in the URL -- ProcessTable wrongly showing WINPIDs as Cygwin PIDs.
Hi Christopher -
your response to Jurgen had mentioned:
> ActiveState perl is a windows program. You can't send cygwin (aka unix)
> signals to a windows proram.
This should be possible if the ActiPerl Windows executable was executed from
a Cygwin terminal -- 'ps' shows it running and 'kill -9' should kill it.
Regards,
Sonam Chauhan
--
Electronic Commerce, Corporate Express Australia Ltd.
Phone: +61-2-9335-0725, Email: sonam.chauhan@ce.com.au
> -----Original Message-----
> From: Jurgen Defurne [mailto:jurgen.defurne@philips.com]
> Sent: Tuesday, 10 May 2005 9:12 PM
> To: Sonam Chauhan
> Cc: cygwin@cygwin.com
> Subject: Re: problems in Perl process management
>
> I also would like to know if it is possible.
>
> However, it could be that it has nothing to do with Cygwin. I have
> a Perl script which forks several children and monitors their output.
>
> If a child fails, then it has no use to run all forked processes further
> and I kill them with the perl 'kill' command. However, I also notice that
> deeper forked processes (grandchildren) refuse to die. This
> script is only run using ActiveState Perl.
>
> I think it is really a serious Windows problem, because using
> the task manager it also seems not really possible to kill a complete
> process hierarchy.
>
> Regards,
>
> Jurgen Defurne
>
>
>
>
>
>
>
>
>
> Sonam Chauhan <sonam.chauhan@ce.com.au>
> Sent by:
> cygwin-owner@cygwin.com
> 2005-05-10 10:41 AM
>
> To: "'cygwin@cygwin.com'" <cygwin@cygwin.com>
> cc: (bcc: Jurgen Defurne/BRG/CE/PHILIPS)
> Subject: problems in Perl process management
> Classification:
>
>
>
>
> Hello -
>
> I'd appreciate help with problems doing process management in Cygwin/Perl.
>
>
> I have a Perl application that creates child processes - I need it to kill
> processes that exceed a certain timeout. I am trying to use the
> Proc::ProcessTable and Proc::Killfam CPAN modules for this.
>
> I ran into two problems:
>
> The first problem was a "can't stat /dev" error message produced when
> calling Proc::Killfam. This problem was fixed by a script I found that
> populated entries under /dev.
>
> To understand the next probem, have a look at the simple test script
> attached. The script forks a child process, which runs `sleep` in a third
> process. The parent process then tries to kill both children on expiry of
> a
> timeout. The script behaves perfectly on Linux -- it works as expected and
> kills the fork-ed child Perl process, as well it's `sleep` child process.
> However, on Cygwin/Perl it only kills the fork-ed Perl child - it cannot
> kill the `sleep`-ing child.
>
> The problem seems to be that the process table data returned by
> Proc::ProcessTable seems to differ from the data returned 'ps'.
> Specifically, Proc::ProcessTable returns the WINPID of a process as the
> PID
> for the backticked `sleep` process.
>
> The closest issue I found in the list archives is this one:
> http://sourceware.org/ml/cygwin/2005-02/msg00224.html
> It does not seem to have been resolved.
>
> I'm running Perl on Cygwin on Windows XP SP2. Running 'cygcheck -c' gives
> the following package status for cygwin and Perl:
> --------------------------
> cygwin 1.5.16-1 OK
> perl 5.8.6-4 OK
> --------------------------
>
> Can anyone help?
>
> Regards,
> Sonam Chauhan
> --
> Electronic Commerce, Corporate Express Australia Ltd.
> Phone: +61-2-9335-0725, Email: sonam.chauhan@ce.com.au
>
>
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Problem reports: http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/