diff options
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c index dd61f3008de..3fe8644b48a 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -5739,9 +5739,10 @@ emacs_get_tty_pgrp (struct Lisp_Process *p) | |||
| 5739 | 5739 | ||
| 5740 | DEFUN ("process-running-child-p", Fprocess_running_child_p, | 5740 | DEFUN ("process-running-child-p", Fprocess_running_child_p, |
| 5741 | Sprocess_running_child_p, 0, 1, 0, | 5741 | Sprocess_running_child_p, 0, 1, 0, |
| 5742 | doc: /* Return t if PROCESS has given the terminal to a child. | 5742 | doc: /* Return non-nil if PROCESS has given the terminal to a |
| 5743 | If the operating system does not make it possible to find out, | 5743 | child. If the operating system does not make it possible to find out, |
| 5744 | return t unconditionally. */) | 5744 | return t. If we can find out, return the numeric ID of the foreground |
| 5745 | process group. */) | ||
| 5745 | (Lisp_Object process) | 5746 | (Lisp_Object process) |
| 5746 | { | 5747 | { |
| 5747 | /* Initialize in case ioctl doesn't exist or gives an error, | 5748 | /* Initialize in case ioctl doesn't exist or gives an error, |
| @@ -5764,6 +5765,8 @@ return t unconditionally. */) | |||
| 5764 | 5765 | ||
| 5765 | if (gid == p->pid) | 5766 | if (gid == p->pid) |
| 5766 | return Qnil; | 5767 | return Qnil; |
| 5768 | if (gid != -1) | ||
| 5769 | return make_number (gid); | ||
| 5767 | return Qt; | 5770 | return Qt; |
| 5768 | } | 5771 | } |
| 5769 | 5772 | ||