job: Let job_start callers to selectively ignore stdio

Passing NULL as the callback for stdout/stderr will result in job_start ignoring
stdout/stderr, respectively. A 'writable' boolean argument was also added, and
when false `job_start` will ignore stdin.

Also, refactor os_system to allow passing NULL as the `output` argument.
This commit is contained in:
Thiago de Arruda
2014-10-30 10:19:48 -03:00
parent 25e26e0056
commit c92d17b4aa
4 changed files with 85 additions and 45 deletions

View File

@@ -119,6 +119,7 @@ uint64_t channel_from_job(char **argv)
int status;
channel->data.job = job_start(argv,
channel,
true,
job_out,
job_err,
job_exit,