Function: set-process-sentinel

set-process-sentinel is a function defined in process.c.

Signature

(set-process-sentinel PROCESS SENTINEL)

Documentation

Give PROCESS the sentinel SENTINEL; nil for default.

The sentinel is called as a function when the process changes state. It gets two arguments: the process, and a string describing the change.

Other relevant functions are documented in the process group.

Shortdoc

;; process
(set-process-sentinel process (lambda (proc string)))

Source Code

// Defined in /usr/src/emacs/src/process.c
{
  struct Lisp_Process *p;

  CHECK_PROCESS (process);
  p = XPROCESS (process);

  if (NILP (sentinel))
    sentinel = Qinternal_default_process_sentinel;

  pset_sentinel (p, sentinel);
  if (NETCONN1_P (p) || SERIALCONN1_P (p) || PIPECONN1_P (p))
    pset_childp (p, Fplist_put (p->childp, QCsentinel, sentinel));
  return sentinel;
}