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/msgpack_rpc | |
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/msgpack_rpc')
-rw-r--r-- | src/nvim/msgpack_rpc/channel.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c index 3df3200d3d..00b8cd072f 100644 --- a/src/nvim/msgpack_rpc/channel.c +++ b/src/nvim/msgpack_rpc/channel.c @@ -132,14 +132,13 @@ uint64_t channel_from_job(char **argv) incref(channel); // job channels are only closed by the exit_cb int status; - channel->data.job = job_start(argv, - channel, - true, - job_out, - job_err, - job_exit, - 0, - &status); + JobOptions opts = JOB_OPTIONS_INIT; + opts.argv = argv; + opts.data = channel; + opts.stdout_cb = job_out; + opts.stderr_cb = job_err; + opts.exit_cb = job_exit; + channel->data.job = job_start(opts, &status); if (status <= 0) { if (status == 0) { // Two decrefs needed if status == 0. |