Skip Menu |

This queue is for tickets about the WWW-Mechanize-Pluggable CPAN distribution.

Report information
The Basics
Id: 29502
Status: resolved
Worked: 10 min
Priority: 0/
Queue: WWW-Mechanize-Pluggable

People
Owner: mcmahon [...] cpan.org
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.03
Fixed in: (no value)



Subject: kill KILL=>$foo suspicious
I found this code in t/local/back.t: kill KILL=>$pid404; # Extreme prejudice intended; I wonder how this is suppoesed to work and when it ever works. Did you consider that $pid404 can be undefined? Where do you import the KILL symbol from? The reason why I ask is that this line can kill the whole parentgroup under some unknown circumstances.
Subject: Re: [rt.cpan.org #29502] kill KILL=>$foo suspicious
Date: Wed, 19 Sep 2007 18:09:45 -0700
To: bug-WWW-Mechanize-Pluggable [...] rt.cpan.org
From: Joe McMahon <mcmahon [...] yahoo-inc.com>
On Sep 19, 2007, at 5:57 PM, Andreas Koenig via RT wrote: Show quoted text
> > Wed Sep 19 20:57:15 2007: Request 29502 was acted upon. > Transaction: Ticket created by ANDK > Queue: WWW-Mechanize-Pluggable > Subject: kill KILL=>$foo suspicious > Broken in: 1.03 > Severity: Critical > Owner: Nobody > Requestors: ANDK@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=29502 > > > > I found this code in t/local/back.t: > > kill KILL=>$pid404; # Extreme prejudice intended; > > I wonder how this is suppoesed to work and when it ever works. > Did you consider that $pid404 can be undefined? Where do you import > the > KILL symbol from? > > The reason why I ask is that this line can kill the whole parentgroup > under some unknown circumstances.
This was inherited from the original WWW::Mechanize tests; I think it's no longer needed. --- Joe M.
Subject: Re: [rt.cpan.org #29502] kill KILL=>$foo suspicious
Date: Wed, 19 Sep 2007 18:16:35 -0700
To: bug-WWW-Mechanize-Pluggable [...] rt.cpan.org
From: Joe McMahon <mcmahon [...] yahoo-inc.com>
On Sep 19, 2007, at 5:57 PM, Andreas Koenig via RT wrote: Show quoted text
> > Wed Sep 19 20:57:15 2007: Request 29502 was acted upon. > Transaction: Ticket created by ANDK > Queue: WWW-Mechanize-Pluggable > Subject: kill KILL=>$foo suspicious > Broken in: 1.03 > Severity: Critical > Owner: Nobody > Requestors: ANDK@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=29502 > > > > I found this code in t/local/back.t: > > kill KILL=>$pid404; # Extreme prejudice intended; > > I wonder how this is suppoesed to work and when it ever works.
Looking at the code in context (I had forgotten this section), what this appears to be trying to do is kill the HTTP::Daemon process if the fork can't or doesn't work. I'm adding a defined() test to the kill(), so it reads kill KILL=>$pid404 if defined $pid404; The preceeding fork() should set $pid404 is a fork is possible. If it wasn't, the $pid404 will be undefined, and we don't try to kill the process. --- Joe M.
Fixed in 1.04 (and credited to you Andreas, thanks!)
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #29502] kill KILL=>$foo suspicious
Date: Thu, 20 Sep 2007 04:01:01 +0200
To: bug-WWW-Mechanize-Pluggable [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Wed, 19 Sep 2007 21:10:46 -0400, "mcmahon@yahoo-inc.com via RT" <bug-WWW-Mechanize-Pluggable@rt.cpan.org> said:
Show quoted text
> This was inherited from the original WWW::Mechanize tests; I think > it's no longer needed.
Thanks for the instant reply! Please remove it, it managed to kill my running cpan shell:/ -- andreas
On Wed Sep 19 22:01:37 2007, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote: Show quoted text
> >>>>> On Wed, 19 Sep 2007 21:10:46 -0400, "mcmahon@yahoo-inc.com via
> RT" <bug-WWW-Mechanize-Pluggable@rt.cpan.org> said: >
> > This was inherited from the original WWW::Mechanize tests; I think > > it's no longer needed.
> > Thanks for the instant reply! Please remove it, it managed to kill my > running cpan shell:/
Ack. Definitely not the intention. Can you let me know if the new release fixes this? (Worked OK for me.)
Closing. Problem fixed by only killing if we got a real PID.