[padb] r443 committed - Add a check that the PID given as the process to debug isnt padb itsel...
padb at googlecode.com
padb at googlecode.com
Fri Jun 24 00:15:35 BST 2011
Revision: 443
Author: apittman at gmail.com
Date: Thu Jun 23 16:14:50 2011
Log: Add a check that the PID given as the process to debug isnt padb
itself!
previously if this happened padb would hang, not it errors with a somewhat
helpful warning.
http://code.google.com/p/padb/source/detail?r=443
Modified:
/trunk/src/padb
=======================================
--- /trunk/src/padb Wed Jun 22 16:17:55 2011
+++ /trunk/src/padb Thu Jun 23 16:14:50 2011
@@ -9285,6 +9285,9 @@
sub register_target_process {
my ( $rank, $pid ) = @_;
+ if ( $pid == $$ ) {
+ croak("Error locating processes, refusing to debug self");
+ }
$inner_conf{rmpids}{$pid}{rank} = $rank;
return;
}
@@ -10325,7 +10328,7 @@
my $count = sysread $s, $d, 65536;
# Dead connection.
- if ( not defined $d or $count == 0 ) {
+ if ( not defined $d or not defined $count or $count == 0 )
{
if ( eof $s ) {
$sel->remove($s);
More information about the padb-devel
mailing list