diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-06-26 15:32:01 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-07-17 11:30:01 -0300 |
commit | 21d44ab115ba399ea06dcd47c71960332885e48c (patch) | |
tree | 4b6041dc603fa0093e46808800fcb73ada43ef0a | |
parent | f17668234a5bcd1905775436da9cf0e136bb8150 (diff) | |
download | rneovim-21d44ab115ba399ea06dcd47c71960332885e48c.tar.gz rneovim-21d44ab115ba399ea06dcd47c71960332885e48c.tar.bz2 rneovim-21d44ab115ba399ea06dcd47c71960332885e48c.zip |
channel: Refactor channel_from_job to return the channel id
-rw-r--r-- | src/nvim/os/channel.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/os/channel.c b/src/nvim/os/channel.c index ae33ca31a3..a57fb9ea9e 100644 --- a/src/nvim/os/channel.c +++ b/src/nvim/os/channel.c @@ -81,7 +81,8 @@ void channel_teardown(void) /// stdin/stdout. stderr is forwarded to the editor error stream. /// /// @param argv The argument vector for the process -bool channel_from_job(char **argv) +/// @return The channel id +uint64_t channel_from_job(char **argv) { Channel *channel = register_channel(); channel->is_job = true; @@ -98,10 +99,10 @@ bool channel_from_job(char **argv) if (status <= 0) { close_channel(channel); - return false; + return 0; } - return true; + return channel->id; } /// Creates an API channel from a libuv stream representing a tcp or |