From 1ec7db70ecac75736b5042203e57aae57b65abe6 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Mon, 23 Feb 2015 12:34:02 -0300 Subject: 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. --- src/nvim/msgpack_rpc/channel.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/nvim/msgpack_rpc/channel.c') 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. -- cgit