#$result = `$CmdLine`;
# sicheres Forken
- $gammu_pid = open( GAMMU, "|-");
+ $gammu_pid = open( GAMMU, "-|");
local $SIG{'ALRM'} = sub { die "Timeout\n" };
$result = "";
eval {
alarm $timeout;
- while ( <GAMMU> ) {
+ while ( $_ = <GAMMU> ) {
$result .= $_;
}
close( GAMMU ) || error "kid exited $?", "warning";
}
unless ( $? ) { # Erfolgreich!!!
+ debug "Parse Content '" . $result . "'.", 2;
$sms = new SMS();
$sms->parse_from_gammu( $result );
unless ( $sms->empty() ) {