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

@@ -10675,6 +10675,7 @@ static void f_jobstart(typval_T *argvars, typval_T *rettv)
job_start(argv,
xstrdup((char *)argvars[0].vval.v_string),
true,
on_job_stdout,
on_job_stderr,
on_job_exit,