Skip Menu |

This queue is for tickets about the Purple CPAN distribution.

Report information
The Basics
Id: 34981
Status: resolved
Priority: 0/
Queue: Purple

People
Owner: Nobody in particular
Requestors: imacat [...] mail.imacat.idv.tw
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.9
Fixed in: (no value)



Subject: Killing undef in t/client.t Kills the Parent
Dear Chris Dent, Hi. This is imacat from Taiwan. I found that the t/client.t in your Purple-0.9 may kill the parent if test fails. I tried to investigate further. It seems that, in t/client.t, if $server->background() fails, "kill 15, $pid" will become "kill 15, undef" and kill the parent process accidently, at least on Linux. This parent process may be the test suite that I'm running, or the make or even the shell. I made a simple patch against Purple-0.9, in the hope that it helps. Please tell me if there is any problem, or if I could be of any help. Thank you.
Subject: Purple-0.9-killundef.diff
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 diff -u -r Purple-0.9.orig/t/client.t Purple-0.9/t/client.t - --- Purple-0.9.orig/t/client.t 2006-02-19 11:16:09.000000000 +0800 +++ Purple-0.9/t/client.t 2008-04-14 10:00:33.000000000 +0800 @@ -65,5 +65,5 @@ } END { - - kill 15, $pid; + kill 15, $pid if defined $pid; } -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkgCutkACgkQi9gubzC5S1xaywCePnikx3w29EXpDcHMqKMvATlO QksAoKrZW4yIVOHf/LgITdIG4VA7Al3s =D8qy -----END PGP SIGNATURE-----
Thanks for the patch. I've applied it, and I will shortly release a 1.0 version that includes another small fix. Nothing too exciting. I haven't had a chance to do as much with Purple.pm as I would have liked. Are you doing work with it?