Thanks for the tip!
However what needs to be done, needs to be done... so do you by any change have a good suggestion as to writing perl code that reads a Storable object from socket, but returns an error status when you exceed the timeout without resorting to signals?
UPDATE actually, I tried this, and it still segfaults:
sub read { my $socket = shift; my $timeout = shift || 60; return undef unless( _is_valid( $socket ) ); my $hash; local $@ = ''; my $select = IO::Select->new( $socket ); while( $timeout-- ) { last unless _is_valid( $socket ); if( $select->can_read( 1 ) ) { eval{ $hash = fd_retrieve( $socket ); }; return $@ ? undef : $hash } } return undef; }
In reply to Re: Re (tilly) 1: Segfault with Storable ( updated w/ code )
by lestrrat
in thread Segfault with Storable
by lestrrat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |