diff options
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/process.c b/src/process.c index db7e31dd244..d5e76b29b98 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1457,12 +1457,12 @@ static Lisp_Object start_process_unwind (); | |||
| 1457 | DEFUN ("start-process", Fstart_process, Sstart_process, 3, MANY, 0, | 1457 | DEFUN ("start-process", Fstart_process, Sstart_process, 3, MANY, 0, |
| 1458 | doc: /* Start a program in a subprocess. Return the process object for it. | 1458 | doc: /* Start a program in a subprocess. Return the process object for it. |
| 1459 | NAME is name for process. It is modified if necessary to make it unique. | 1459 | NAME is name for process. It is modified if necessary to make it unique. |
| 1460 | BUFFER is the buffer or (buffer-name) to associate with the process. | 1460 | BUFFER is the buffer (or buffer name) to associate with the process. |
| 1461 | Process output goes at end of that buffer, unless you specify | 1461 | Process output goes at end of that buffer, unless you specify |
| 1462 | an output stream or filter function to handle the output. | 1462 | an output stream or filter function to handle the output. |
| 1463 | BUFFER may be also nil, meaning that this process is not associated | 1463 | BUFFER may be also nil, meaning that this process is not associated |
| 1464 | with any buffer. | 1464 | with any buffer. |
| 1465 | Third arg is program file name. It is searched for in PATH. | 1465 | PROGRAM is the program file name. It is searched for in PATH. |
| 1466 | Remaining arguments are strings to give program as arguments. | 1466 | Remaining arguments are strings to give program as arguments. |
| 1467 | 1467 | ||
| 1468 | usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | 1468 | usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) |
| @@ -4018,8 +4018,8 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 4018 | int do_display; | 4018 | int do_display; |
| 4019 | { | 4019 | { |
| 4020 | register int channel, nfds; | 4020 | register int channel, nfds; |
| 4021 | static SELECT_TYPE Available; | 4021 | SELECT_TYPE Available; |
| 4022 | static SELECT_TYPE Connecting; | 4022 | SELECT_TYPE Connecting; |
| 4023 | int check_connect, check_delay, no_avail; | 4023 | int check_connect, check_delay, no_avail; |
| 4024 | int xerrno; | 4024 | int xerrno; |
| 4025 | Lisp_Object proc; | 4025 | Lisp_Object proc; |
| @@ -4030,6 +4030,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 4030 | /* Either nil or a cons cell, the car of which is of interest and | 4030 | /* Either nil or a cons cell, the car of which is of interest and |
| 4031 | may be changed outside of this routine. */ | 4031 | may be changed outside of this routine. */ |
| 4032 | Lisp_Object wait_for_cell = Qnil; | 4032 | Lisp_Object wait_for_cell = Qnil; |
| 4033 | int saved_waiting_for_user_input_p = waiting_for_user_input_p; | ||
| 4033 | 4034 | ||
| 4034 | FD_ZERO (&Available); | 4035 | FD_ZERO (&Available); |
| 4035 | FD_ZERO (&Connecting); | 4036 | FD_ZERO (&Connecting); |
| @@ -4643,7 +4644,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 4643 | } /* end for each file descriptor */ | 4644 | } /* end for each file descriptor */ |
| 4644 | } /* end while exit conditions not met */ | 4645 | } /* end while exit conditions not met */ |
| 4645 | 4646 | ||
| 4646 | waiting_for_user_input_p = 0; | 4647 | waiting_for_user_input_p = saved_waiting_for_user_input_p; |
| 4647 | 4648 | ||
| 4648 | /* If calling from keyboard input, do not quit | 4649 | /* If calling from keyboard input, do not quit |
| 4649 | since we want to return C-g as an input character. | 4650 | since we want to return C-g as an input character. |
| @@ -4894,6 +4895,8 @@ read_process_output (proc, channel) | |||
| 4894 | } | 4895 | } |
| 4895 | 4896 | ||
| 4896 | carryover = nbytes - coding->consumed; | 4897 | carryover = nbytes - coding->consumed; |
| 4898 | if (SCHARS (p->decoding_buf) < carryover) | ||
| 4899 | p->decoding_buf = make_uninit_string (carryover); | ||
| 4897 | bcopy (chars + coding->consumed, SDATA (p->decoding_buf), | 4900 | bcopy (chars + coding->consumed, SDATA (p->decoding_buf), |
| 4898 | carryover); | 4901 | carryover); |
| 4899 | XSETINT (p->decoding_carryover, carryover); | 4902 | XSETINT (p->decoding_carryover, carryover); |
| @@ -4998,6 +5001,8 @@ read_process_output (proc, channel) | |||
| 4998 | } | 5001 | } |
| 4999 | } | 5002 | } |
| 5000 | carryover = nbytes - coding->consumed; | 5003 | carryover = nbytes - coding->consumed; |
| 5004 | if (SCHARS (p->decoding_buf) < carryover) | ||
| 5005 | p->decoding_buf = make_uninit_string (carryover); | ||
| 5001 | bcopy (chars + coding->consumed, SDATA (p->decoding_buf), | 5006 | bcopy (chars + coding->consumed, SDATA (p->decoding_buf), |
| 5002 | carryover); | 5007 | carryover); |
| 5003 | XSETINT (p->decoding_carryover, carryover); | 5008 | XSETINT (p->decoding_carryover, carryover); |