diff options
| author | Jim Blandy | 1992-10-31 05:27:42 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-10-31 05:27:42 +0000 |
| commit | f97388409e045f8ed7aec32517069de0534be754 (patch) | |
| tree | 165321dad7d1a6a7357e68a665ba402d68f91ee9 /src | |
| parent | 8caf6c73d778b9c871d566852f0dbab3dc56f9fe (diff) | |
| download | emacs-f97388409e045f8ed7aec32517069de0534be754.tar.gz emacs-f97388409e045f8ed7aec32517069de0534be754.zip | |
* process.c: (status_convert): Declare this to return a
Lisp_Object at the top of the file.
(decode_status): Don't untag XCONS (tem)->cdr before storing it in
tem; tem is a Lisp_Object, too.
(process_send_signal): Declare this to be static void. Don't
return Qnil; nobody cares.
(sigchld_handler): Use XFASTINT to manipulate p->infd.
* process.c (pty_process): Variable deleted; it's no longer used.
(syms_of_process): Don't initialize it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/process.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/process.c b/src/process.c index e8a87378025..0241f9a3481 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -284,6 +284,8 @@ int proc_buffered_char[MAXDESC]; | |||
| 284 | /* Compute the Lisp form of the process status, p->status, from | 284 | /* Compute the Lisp form of the process status, p->status, from |
| 285 | the numeric status that was returned by `wait'. */ | 285 | the numeric status that was returned by `wait'. */ |
| 286 | 286 | ||
| 287 | Lisp_Object status_convert (); | ||
| 288 | |||
| 287 | update_status (p) | 289 | update_status (p) |
| 288 | struct Lisp_Process *p; | 290 | struct Lisp_Process *p; |
| 289 | { | 291 | { |
| @@ -336,7 +338,7 @@ decode_status (l, symbol, code, coredump) | |||
| 336 | *symbol = XCONS (l)->car; | 338 | *symbol = XCONS (l)->car; |
| 337 | tem = XCONS (l)->cdr; | 339 | tem = XCONS (l)->cdr; |
| 338 | *code = XFASTINT (XCONS (tem)->car); | 340 | *code = XFASTINT (XCONS (tem)->car); |
| 339 | tem = XFASTINT (XCONS (tem)->cdr); | 341 | tem = XCONS (tem)->cdr; |
| 340 | *coredump = !NILP (tem); | 342 | *coredump = !NILP (tem); |
| 341 | } | 343 | } |
| 342 | } | 344 | } |
| @@ -374,7 +376,6 @@ status_message (status) | |||
| 374 | } | 376 | } |
| 375 | 377 | ||
| 376 | #ifdef HAVE_PTYS | 378 | #ifdef HAVE_PTYS |
| 377 | static int pty_process; | ||
| 378 | 379 | ||
| 379 | /* Open an available pty, returning a file descriptor. | 380 | /* Open an available pty, returning a file descriptor. |
| 380 | Return -1 on failure. | 381 | Return -1 on failure. |
| @@ -2218,6 +2219,7 @@ Output from processes can arrive in between bunches.") | |||
| 2218 | If NOMSG is zero, insert signal-announcements into process's buffers | 2219 | If NOMSG is zero, insert signal-announcements into process's buffers |
| 2219 | right away. */ | 2220 | right away. */ |
| 2220 | 2221 | ||
| 2222 | static void | ||
| 2221 | process_send_signal (process, signo, current_group, nomsg) | 2223 | process_send_signal (process, signo, current_group, nomsg) |
| 2222 | Lisp_Object process; | 2224 | Lisp_Object process; |
| 2223 | int signo; | 2225 | int signo; |
| @@ -2256,16 +2258,16 @@ process_send_signal (process, signo, current_group, nomsg) | |||
| 2256 | case SIGINT: | 2258 | case SIGINT: |
| 2257 | ioctl (XFASTINT (p->infd), TIOCGETC, &c); | 2259 | ioctl (XFASTINT (p->infd), TIOCGETC, &c); |
| 2258 | send_process (proc, &c.t_intrc, 1); | 2260 | send_process (proc, &c.t_intrc, 1); |
| 2259 | return Qnil; | 2261 | return; |
| 2260 | case SIGQUIT: | 2262 | case SIGQUIT: |
| 2261 | ioctl (XFASTINT (p->infd), TIOCGETC, &c); | 2263 | ioctl (XFASTINT (p->infd), TIOCGETC, &c); |
| 2262 | send_process (proc, &c.t_quitc, 1); | 2264 | send_process (proc, &c.t_quitc, 1); |
| 2263 | return Qnil; | 2265 | return; |
| 2264 | #ifdef SIGTSTP | 2266 | #ifdef SIGTSTP |
| 2265 | case SIGTSTP: | 2267 | case SIGTSTP: |
| 2266 | ioctl (XFASTINT (p->infd), TIOCGLTC, &lc); | 2268 | ioctl (XFASTINT (p->infd), TIOCGLTC, &lc); |
| 2267 | send_process (proc, &lc.t_suspc, 1); | 2269 | send_process (proc, &lc.t_suspc, 1); |
| 2268 | return Qnil; | 2270 | return; |
| 2269 | #endif /* SIGTSTP */ | 2271 | #endif /* SIGTSTP */ |
| 2270 | } | 2272 | } |
| 2271 | #endif /* ! defined (TIOCGLTC) && defined (TIOCGETC) */ | 2273 | #endif /* ! defined (TIOCGLTC) && defined (TIOCGETC) */ |
| @@ -2279,15 +2281,15 @@ process_send_signal (process, signo, current_group, nomsg) | |||
| 2279 | case SIGINT: | 2281 | case SIGINT: |
| 2280 | ioctl (XFASTINT (p->infd), TCGETA, &t); | 2282 | ioctl (XFASTINT (p->infd), TCGETA, &t); |
| 2281 | send_process (proc, &t.c_cc[VINTR], 1); | 2283 | send_process (proc, &t.c_cc[VINTR], 1); |
| 2282 | return Qnil; | 2284 | return; |
| 2283 | case SIGQUIT: | 2285 | case SIGQUIT: |
| 2284 | ioctl (XFASTINT (p->infd), TCGETA, &t); | 2286 | ioctl (XFASTINT (p->infd), TCGETA, &t); |
| 2285 | send_process (proc, &t.c_cc[VQUIT], 1); | 2287 | send_process (proc, &t.c_cc[VQUIT], 1); |
| 2286 | return Qnil; | 2288 | return; |
| 2287 | case SIGTSTP: | 2289 | case SIGTSTP: |
| 2288 | ioctl (XFASTINT (p->infd), TCGETA, &t); | 2290 | ioctl (XFASTINT (p->infd), TCGETA, &t); |
| 2289 | send_process (proc, &t.c_cc[VSWTCH], 1); | 2291 | send_process (proc, &t.c_cc[VSWTCH], 1); |
| 2290 | return Qnil; | 2292 | return; |
| 2291 | } | 2293 | } |
| 2292 | #endif /* ! defined (USG) */ | 2294 | #endif /* ! defined (USG) */ |
| 2293 | 2295 | ||
| @@ -2620,8 +2622,8 @@ sigchld_handler (signo) | |||
| 2620 | 2622 | ||
| 2621 | /* If process has terminated, stop waiting for its output. */ | 2623 | /* If process has terminated, stop waiting for its output. */ |
| 2622 | if (WIFSIGNALED (w) || WIFEXITED (w)) | 2624 | if (WIFSIGNALED (w) || WIFEXITED (w)) |
| 2623 | if (p->infd) | 2625 | if (XFASTINT (p->infd)) |
| 2624 | FD_CLR (p->infd, &input_wait_mask); | 2626 | FD_CLR (XFASTINT (p->infd), &input_wait_mask); |
| 2625 | } | 2627 | } |
| 2626 | 2628 | ||
| 2627 | /* There was no asynchronous process found for that id. Check | 2629 | /* There was no asynchronous process found for that id. Check |
| @@ -2820,9 +2822,6 @@ t or pty (pty) or stream (socket connection).") | |||
| 2820 | #endif | 2822 | #endif |
| 2821 | syms_of_process () | 2823 | syms_of_process () |
| 2822 | { | 2824 | { |
| 2823 | #ifdef HAVE_PTYS | ||
| 2824 | pty_process = intern ("pty"); | ||
| 2825 | #endif | ||
| 2826 | #ifdef HAVE_SOCKETS | 2825 | #ifdef HAVE_SOCKETS |
| 2827 | stream_process = intern ("stream"); | 2826 | stream_process = intern ("stream"); |
| 2828 | #endif | 2827 | #endif |