Show
Ignore:
Timestamp:
27.09.2011 20:57:36 (9 years ago)
Author:
ak19
Message:

Output of running basic java command should go to dev/null on linux systems. It was still going to STDOUT on Ubuntu because the order of 2>&1 and /dev/null matters.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/pdf-box/trunk/java/perllib/plugins/PDFBoxConverter.pm

    r24301 r24676  
    6060    else { 
    6161        # test to see if java is in path      
    62         my $cmd = "java 2>&1"; 
     62        my $cmd = "java"; 
    6363        if ($ENV{'GSDLOS'} =~ /^windows/i) { 
    64         $cmd .= " >nul"; 
     64        $cmd .= " >nul 2>&1"; # java 2>&1 >null or java >null 2>&1 both work (%ERRORLEVEL% is 0) 
    6565        } 
    6666        else { 
    67         $cmd .= " >/dev/null &"; 
     67        # On Ubuntu, java >/dev/null 2>&1 works,  
     68        # but java 2>&1 >/dev/null doesn't work: output goes to screen anyway 
     69        $cmd .= " >/dev/null 2>&1"; 
    6870        } 
    6971