Exemplo n.º 1
0
Arquivo: job.c Projeto: Saneyan/neovim
// Emits a JobExit event if both rstreams are closed
static void exit_cb(uv_process_t *proc, int64_t status, int term_signal)
{
  Job *job = handle_get_job((uv_handle_t *)proc);

  if (--job->pending_refs == 0) {
    emit_exit_event(job);
  }
}
Exemplo n.º 2
0
// Emits a JobExit event if both rstreams are closed
static void exit_cb(uv_process_t *proc, int64_t status, int term_signal)
{
  Job *job = proc->data;

  if (--job->pending_refs == 0) {
    emit_exit_event(job);
  }
}
Exemplo n.º 3
0
Arquivo: job.c Projeto: Saneyan/neovim
// Wraps the call to std{out,err}_cb and emits a JobExit event if necessary.
static void read_cb(RStream *rstream, void *data, bool eof)
{
  Job *job = data;

  if (rstream == job->out) {
    job->stdout_cb(rstream, data, eof);
  } else {
    job->stderr_cb(rstream, data, eof);
  }

  if (eof && --job->pending_refs == 0) {
    emit_exit_event(job);
  }
}