diff options
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/process.c b/src/process.c index f6dad808ffe..38a5c8341cf 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Asynchronous subprocess control for GNU Emacs. | 1 | /* Asynchronous subprocess control for GNU Emacs. |
| 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, | 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, |
| 3 | 1996, 1998, 1999, 2001, 2002, 2003, 2004, | 3 | 1996, 1998, 1999, 2001, 2002, 2003, 2004, |
| 4 | 2005, 2006 Free Software Foundation, Inc. | 4 | 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 7 | 7 | ||
| @@ -815,9 +815,12 @@ nil, indicating the current buffer's process. */) | |||
| 815 | { | 815 | { |
| 816 | #ifdef SIGCHLD | 816 | #ifdef SIGCHLD |
| 817 | Lisp_Object symbol; | 817 | Lisp_Object symbol; |
| 818 | /* Assignment to EMACS_INT stops GCC whining about limited range | ||
| 819 | of data type. */ | ||
| 820 | EMACS_INT pid = p->pid;; | ||
| 818 | 821 | ||
| 819 | /* No problem storing the pid here, as it is still in Vprocess_alist. */ | 822 | /* No problem storing the pid here, as it is still in Vprocess_alist. */ |
| 820 | deleted_pid_list = Fcons (make_fixnum_or_float (p->pid), | 823 | deleted_pid_list = Fcons (make_fixnum_or_float (pid), |
| 821 | /* GC treated elements set to nil. */ | 824 | /* GC treated elements set to nil. */ |
| 822 | Fdelq (Qnil, deleted_pid_list)); | 825 | Fdelq (Qnil, deleted_pid_list)); |
| 823 | /* If the process has already signaled, remove it from the list. */ | 826 | /* If the process has already signaled, remove it from the list. */ |
| @@ -827,7 +830,7 @@ nil, indicating the current buffer's process. */) | |||
| 827 | if (CONSP (p->status)) | 830 | if (CONSP (p->status)) |
| 828 | symbol = XCAR (p->status); | 831 | symbol = XCAR (p->status); |
| 829 | if (EQ (symbol, Qsignal) || EQ (symbol, Qexit)) | 832 | if (EQ (symbol, Qsignal) || EQ (symbol, Qexit)) |
| 830 | Fdelete (make_fixnum_or_float (p->pid), deleted_pid_list); | 833 | Fdelete (make_fixnum_or_float (pid), deleted_pid_list); |
| 831 | else | 834 | else |
| 832 | #endif | 835 | #endif |
| 833 | { | 836 | { |
| @@ -912,10 +915,13 @@ For a network connection, this value is nil. */) | |||
| 912 | (process) | 915 | (process) |
| 913 | register Lisp_Object process; | 916 | register Lisp_Object process; |
| 914 | { | 917 | { |
| 918 | /* Assignment to EMACS_INT stops GCC whining about limited range of | ||
| 919 | data type. */ | ||
| 920 | EMACS_INT pid; | ||
| 921 | |||
| 915 | CHECK_PROCESS (process); | 922 | CHECK_PROCESS (process); |
| 916 | return (XPROCESS (process)->pid | 923 | pid = XPROCESS (process)->pid; |
| 917 | ? make_fixnum_or_float (XPROCESS (process)->pid) | 924 | return (pid ? make_fixnum_or_float (pid) : Qnil); |
| 918 | : Qnil); | ||
| 919 | } | 925 | } |
| 920 | 926 | ||
| 921 | DEFUN ("process-name", Fprocess_name, Sprocess_name, 1, 1, 0, | 927 | DEFUN ("process-name", Fprocess_name, Sprocess_name, 1, 1, 0, |
| @@ -6410,7 +6416,7 @@ sigchld_handler (signo) | |||
| 6410 | 6416 | ||
| 6411 | while (1) | 6417 | while (1) |
| 6412 | { | 6418 | { |
| 6413 | register int pid; | 6419 | register EMACS_INT pid; |
| 6414 | WAITTYPE w; | 6420 | WAITTYPE w; |
| 6415 | Lisp_Object tail; | 6421 | Lisp_Object tail; |
| 6416 | 6422 | ||