Changeset 2289


Ignore:
Timestamp:
2001-04-06T14:28:09+12:00 (23 years ago)
Author:
jrm21
Message:

check if system() returns != 0, rather than just > 0 (-1 => can't run).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/pdftohtml.pl

    r2248 r2289  
    190190    $cmd = "pdftohtml" if ($ENV{'GSDLOS'} =~ /^windows$/);
    191191
    192     if ($timeout) {$cmd = "ulimit -t $timeout;";}
     192    if ($timeout) {$cmd = "ulimit -t $timeout; $cmd";}
    193193    $cmd .= " -noframes \"$input_filename\" \"$output_filestem.html\"";
    194194    $cmd .= " > \"$output_filestem.out\"";
     
    198198    if $ENV{'GSDLOS'} !~ /^windows$/i;
    199199
    200     if (system($cmd)>0) {
     200# system() returns -1 if it can't run, otherwise it's $cmds ret val.
     201    if (system($cmd)!=0) {
    201202    print STDERR "Error executing $cmd: $!\n";
    202203    &util::rm("$output_filestem.text") if (-e "$output_filestem.text");
Note: See TracChangeset for help on using the changeset viewer.