diff options
| author | Paul Eggert | 2014-06-09 13:31:06 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-06-09 13:31:06 -0700 |
| commit | feb6546cdf5b43f8e50aaaabb29c6856a9251893 (patch) | |
| tree | 60ecc4775ad2202b402cfe7e28f1f27d07d30331 /src/process.c | |
| parent | 2c70e6b00aec31c455eee2a939863a4e382986fc (diff) | |
| download | emacs-feb6546cdf5b43f8e50aaaabb29c6856a9251893.tar.gz emacs-feb6546cdf5b43f8e50aaaabb29c6856a9251893.zip | |
Say (accept-process-output P)'s result pertains to P if P is non-nil.
* doc/lispref/processes.texi (Accepting Output):
* src/process.c (Faccept_process_output)
(wait_reading_process_output): Mention that if PROCESS is non-nil,
the return value is about PROCESS, not about other processes.
Diffstat (limited to 'src/process.c')
| -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 b8b8eaaee5b..5006c85fe9d 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -3921,19 +3921,20 @@ DEFUN ("accept-process-output", Faccept_process_output, Saccept_process_output, | |||
| 3921 | 0, 4, 0, | 3921 | 0, 4, 0, |
| 3922 | doc: /* Allow any pending output from subprocesses to be read by Emacs. | 3922 | doc: /* Allow any pending output from subprocesses to be read by Emacs. |
| 3923 | It is given to their filter functions. | 3923 | It is given to their filter functions. |
| 3924 | Non-nil arg PROCESS means do not return until some output has been received | 3924 | Optional argument PROCESS means do not return until output has been |
| 3925 | from PROCESS. | 3925 | received from PROCESS. |
| 3926 | 3926 | ||
| 3927 | Non-nil second arg SECONDS and third arg MILLISEC are number of seconds | 3927 | Optional second argument SECONDS and third argument MILLISEC |
| 3928 | and milliseconds to wait; return after that much time whether or not | 3928 | specify a timeout; return after that much time even if there is |
| 3929 | there is any subprocess output. If SECONDS is a floating point number, | 3929 | no subprocess output. If SECONDS is a floating point number, |
| 3930 | it specifies a fractional number of seconds to wait. | 3930 | it specifies a fractional number of seconds to wait. |
| 3931 | The MILLISEC argument is obsolete and should be avoided. | 3931 | The MILLISEC argument is obsolete and should be avoided. |
| 3932 | 3932 | ||
| 3933 | If optional fourth arg JUST-THIS-ONE is non-nil, only accept output | 3933 | If optional fourth argument JUST-THIS-ONE is non-nil, accept output |
| 3934 | from PROCESS, suspending reading output from other processes. | 3934 | from PROCESS only, suspending reading output from other processes. |
| 3935 | If JUST-THIS-ONE is an integer, don't run any timers either. | 3935 | If JUST-THIS-ONE is an integer, don't run any timers either. |
| 3936 | Return non-nil if we received any output before the timeout expired. */) | 3936 | Return non-nil if we received any output from PROCESS (or, if PROCESS |
| 3937 | is nil, from any process) before the timeout expired. */) | ||
| 3937 | (register Lisp_Object process, Lisp_Object seconds, Lisp_Object millisec, Lisp_Object just_this_one) | 3938 | (register Lisp_Object process, Lisp_Object seconds, Lisp_Object millisec, Lisp_Object just_this_one) |
| 3938 | { | 3939 | { |
| 3939 | intmax_t secs; | 3940 | intmax_t secs; |
| @@ -4255,16 +4256,14 @@ wait_reading_process_output_1 (void) | |||
| 4255 | (and gobble terminal input into the buffer if any arrives). | 4256 | (and gobble terminal input into the buffer if any arrives). |
| 4256 | 4257 | ||
| 4257 | If WAIT_PROC is specified, wait until something arrives from that | 4258 | If WAIT_PROC is specified, wait until something arrives from that |
| 4258 | process. The return value is true if we read some input from | 4259 | process. |
| 4259 | that process. | ||
| 4260 | 4260 | ||
| 4261 | If JUST_WAIT_PROC is nonzero, handle only output from WAIT_PROC | 4261 | If JUST_WAIT_PROC is nonzero, handle only output from WAIT_PROC |
| 4262 | (suspending output from other processes). A negative value | 4262 | (suspending output from other processes). A negative value |
| 4263 | means don't run any timers either. | 4263 | means don't run any timers either. |
| 4264 | 4264 | ||
| 4265 | If WAIT_PROC is specified, then the function returns true if we | 4265 | Return true if we received input from WAIT_PROC, or from any |
| 4266 | received input from that process before the timeout elapsed. | 4266 | process if WAIT_PROC is null. */ |
| 4267 | Otherwise, return true if we received input from any process. */ | ||
| 4268 | 4267 | ||
| 4269 | bool | 4268 | bool |
| 4270 | wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | 4269 | wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, |