[Bio] / FigKernelPackages / FIG.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/FIG.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.632, Sat Oct 13 13:13:45 2007 UTC revision 1.633, Mon Oct 15 19:14:36 2007 UTC
# Line 3356  Line 3356 
3356      }      }
3357  }  }
3358    
3359    =head3 interpret_error_code
3360    
3361      ($exitcode, $signal, $msg) = &FIG::interpret_error_code($?)
3362    
3363    Determine if the given result code was due to a process exiting abnormally
3364    or by receiving a signal.
3365    
3366    =cut
3367    
3368    sub interpret_error_code
3369    {
3370        shift if UNIVERSAL::isa($_[0],__PACKAGE__);
3371    
3372        my($rc) = @_;
3373    
3374        if (WIFEXITED($rc))
3375        {
3376            return (WEXITSTATUS($rc),  undef, "Exited with status " . WEXITSTATUS($rc));
3377        }
3378        elsif (WIFSIGNALED($rc))
3379        {
3380            return (undef, WTERMSIG($rc), "Terminated with signal " .  WTERMSIG($rc));
3381        }
3382        elsif (WIFSTOPPED($rc))
3383        {
3384            return (undef, WSTOPSIG($rc), "Stopped with signal " .  WSTOPSIG($rc));
3385        }
3386        else
3387        {
3388            return ($rc, undef, "Unknown return code $rc");
3389        }
3390    }
3391    
3392    
3393  =head3 augment_path  =head3 augment_path
3394    
3395  C<< FIG::augment_path($dirName); >>  C<< FIG::augment_path($dirName); >>

Legend:
Removed from v.1.632  
changed lines
  Added in v.1.633

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3