예제 #1
0
파일: job.c 프로젝트: 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);
  }
}
예제 #2
0
파일: job.c 프로젝트: SuriyaaKudoIsc/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 = proc->data;

  if (--job->pending_refs == 0) {
    emit_exit_event(job);
  }
}
예제 #3
0
파일: job.c 프로젝트: 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);
  }
}