src/nvim/os/channel.c
uint64_t channel_from_job(char **argv)
{
  Channel *channel = register_channel();
  channel->is_job = true;

  int status;
  channel->data.job = job_start(argv,
                                channel,
                                job_out,
                                job_err,
                                NULL,
                                0,
                                &status);

  if (status <= 0) {
    close_channel(channel);
    return 0;
  }

  return channel->id;
}
/// Creates an API channel by starting a job and connecting to its
/// stdin/stdout. stderr is forwarded to the editor error stream.
///
/// @param argv The argument vector for the process
/// @return The channel id
Creates an API channel by starting a job and connecting to its
stdin/stdout. stderr is forwarded to the editor error stream.
Creates an API channel by starting a job and connecting to its stdin / stdout . stderr is forwarded to the editor error stream .
uint64_t channel_from_job(char **argv)
{
  Channel *channel = register_channel();
  channel->is_job = true;
  int status;
  channel->data.job = job_start(argv,
                                channel,
                                job_out,
                                job_err,
                                NULL,
                                0,
                                &status);
  if (status <= 0) {
    close_channel(channel);
    return 0;
  }
  return channel->id;
}
uint64_t channel_from_job ( char * * argv ) { Channel * channel = register_channel ( ) ; channel -> is_job = true ; int status ; channel -> data . job = job_start ( argv , channel , job_out , job_err , NULL , 0 , & status ) ; if ( status <= 0 ) { close_channel ( channel ) ; return 0 ; } return channel -> id ; }
Creates an API channel by starting a job and connecting to its
stdin/stdout.
Creates an API channel by starting a job and connecting to its stdin / stdout .