job_start: Do not close in/out/err on error.

The streams job_close_*() reference have not been initialized by the
time we call uv_spawn() and libuv closes these pipes for us when spawn()
fails.
This commit is contained in:
Scott Prager
2014-10-27 14:26:46 -04:00
committed by Thiago de Arruda
parent d10e83fec2
commit dd4263a0c8

View File

@@ -216,9 +216,6 @@ Job *job_start(char **argv,
// Spawn the job // Spawn the job
if (uv_spawn(uv_default_loop(), &job->proc, &job->proc_opts) != 0) { if (uv_spawn(uv_default_loop(), &job->proc, &job->proc_opts) != 0) {
close_job_in(job);
close_job_out(job);
close_job_err(job);
*status = -1; *status = -1;
return NULL; return NULL;
} }