[padb-devel] [padb] r211 committed - Look after gdb handles better, don't create them as empty string but a...
codesite-noreply at google.com
codesite-noreply at google.com
Tue Sep 8 20:25:31 BST 2009
Revision: 211
Author: apittman
Date: Tue Sep 8 12:24:56 2009
Log: Look after gdb handles better, don't create them as empty string but
allow perl to create them itself and
only close them if they have actually been opened.
http://code.google.com/p/padb/source/detail?r=211
Modified:
/branches/cleanup/src/padb
=======================================
--- /branches/cleanup/src/padb Tue Sep 8 12:19:39 2009
+++ /branches/cleanup/src/padb Tue Sep 8 12:24:56 2009
@@ -4658,7 +4658,9 @@
return is_resmgr_process($parent_pid);
}
-$SIG{PIPE} = 'IGNORE';
+# This used to happen on ia64 when gdb segfaulted, I've not seen that for
a number
+# of years however so lets try not doing it for a while and see where that
gets us.
+#$SIG{PIPE} = 'IGNORE';
sub gdb_start {
my ( $exe, $core ) = @_;
@@ -4666,9 +4668,6 @@
gdbpid => -1,
tracepid => -1,
attached => 0,
- rdr => "",
- wtr => "",
- err => "",
};
my $cmd = 'gdb --interpreter=mi -q';
@@ -4686,9 +4685,10 @@
my ($gdb) = @_;
my $result = gdb_send( $gdb, 'quit' );
waitpid( $gdb->{gdbpid}, 0 );
- close( $gdb->{rdr} );
- close( $gdb->{wtr} );
- close( $gdb->{err} );
+ foreach my $fdname (qw(rdr wtr err)) {
+ next unless exists $gdb->{$fdname};
+ close( $gdb->{$fdname} );
+ }
return;
}
More information about the padb-devel
mailing list