diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-02-23 12:34:02 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-02-23 21:43:33 -0300 |
commit | 1ec7db70ecac75736b5042203e57aae57b65abe6 (patch) | |
tree | d2f169ac3a5c7460d04997e31efd104920e68c5e /src/nvim/os/shell.c | |
parent | 0b8d3cb5074031d04ad3def786775853e67ecfbe (diff) | |
download | rneovim-1ec7db70ecac75736b5042203e57aae57b65abe6.tar.gz rneovim-1ec7db70ecac75736b5042203e57aae57b65abe6.tar.bz2 rneovim-1ec7db70ecac75736b5042203e57aae57b65abe6.zip |
job: Refactor process spawning and startup arguments
- process spawning was decoupled from the rest of the job control logic. The
goal is reusing it for spawning processes connected to pseudo terminal file
descriptors.
- job_start now receives a JobOptions structure containing all the startup
options.
Diffstat (limited to 'src/nvim/os/shell.c')
-rw-r--r-- | src/nvim/os/shell.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c index 32c7ea564d..8cf7e7161d 100644 --- a/src/nvim/os/shell.c +++ b/src/nvim/os/shell.c @@ -201,14 +201,14 @@ static int shell(const char *cmd, char **argv = shell_build_argv(cmd, extra_args); int status; - Job *job = job_start(argv, - &buf, - input != NULL, - data_cb, - data_cb, - NULL, - 0, - &status); + JobOptions opts = JOB_OPTIONS_INIT; + opts.argv = argv; + opts.data = &buf; + opts.writable = input != NULL; + opts.stdout_cb = data_cb; + opts.stderr_cb = data_cb; + opts.exit_cb = NULL; + Job *job = job_start(opts, &status); if (status <= 0) { // Failed, probably due to `sh` not being executable |