@@ -62,7 +62,7 @@ func StartProgram(envVars []string, timeoutSec int, stdout, stderr io.WriteClose
62
62
defer minuteTicker .Stop ()
63
63
unixSecAtStart := time .Now ().Unix ()
64
64
timeLimitExceeded := time .After (time .Duration (timeoutSec ) * time .Second )
65
- processExitChan := make (chan error , 1 )
65
+ processExitChan := make (chan error )
66
66
absPath , err := filepath .Abs (program )
67
67
if err != nil {
68
68
return fmt .Errorf ("failed to determine abs path of the program %q: %w" , program , err )
@@ -145,6 +145,6 @@ func StartProgram(envVars []string, timeoutSec int, stdout, stderr io.WriteClose
145
145
// It returns stdout+stderr combined, the maximum size is capped to MaxExternalProgramOutputBytes.
146
146
func InvokeProgram (envVars []string , timeoutSec int , program string , args ... string ) (string , error ) {
147
147
outBuf := lalog .NewByteLogWriter (io .Discard , MaxExternalProgramOutputBytes )
148
- err := StartProgram (envVars , timeoutSec , outBuf , outBuf , make (chan <- error ), make (<- chan struct {}), program , args ... )
148
+ err := StartProgram (envVars , timeoutSec , outBuf , outBuf , make (chan <- error , 1 ), make (<- chan struct {}), program , args ... )
149
149
return string (outBuf .Retrieve (false )), err
150
150
}
0 commit comments