diff options
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/src/process.c b/src/process.c index f4613be28ed..42dd17c57e0 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -957,7 +957,7 @@ DEFUN ("process-command", Fprocess_command, Sprocess_command, 1, 1, 0, | |||
| 957 | This is a list of strings, the first string being the program executed | 957 | This is a list of strings, the first string being the program executed |
| 958 | and the rest of the strings being the arguments given to it. | 958 | and the rest of the strings being the arguments given to it. |
| 959 | For a network or serial process, this is nil (process is running) or t | 959 | For a network or serial process, this is nil (process is running) or t |
| 960 | \(process is stopped). */) | 960 | (process is stopped). */) |
| 961 | (register Lisp_Object process) | 961 | (register Lisp_Object process) |
| 962 | { | 962 | { |
| 963 | CHECK_PROCESS (process); | 963 | CHECK_PROCESS (process); |
| @@ -2674,7 +2674,7 @@ is not given or nil, 1 stopbit is used. | |||
| 2674 | :flowcontrol FLOWCONTROL -- FLOWCONTROL determines the type of | 2674 | :flowcontrol FLOWCONTROL -- FLOWCONTROL determines the type of |
| 2675 | flowcontrol to be used, which is either nil (don't use flowcontrol), | 2675 | flowcontrol to be used, which is either nil (don't use flowcontrol), |
| 2676 | the symbol `hw' (use RTS/CTS hardware flowcontrol), or the symbol `sw' | 2676 | the symbol `hw' (use RTS/CTS hardware flowcontrol), or the symbol `sw' |
| 2677 | \(use XON/XOFF software flowcontrol). If FLOWCONTROL is not given, no | 2677 | (use XON/XOFF software flowcontrol). If FLOWCONTROL is not given, no |
| 2678 | flowcontrol is used. | 2678 | flowcontrol is used. |
| 2679 | 2679 | ||
| 2680 | `serial-process-configure' is called by `make-serial-process' for the | 2680 | `serial-process-configure' is called by `make-serial-process' for the |
| @@ -2682,12 +2682,12 @@ initial configuration of the serial port. | |||
| 2682 | 2682 | ||
| 2683 | Examples: | 2683 | Examples: |
| 2684 | 2684 | ||
| 2685 | \(serial-process-configure :process "/dev/ttyS0" :speed 1200) | 2685 | (serial-process-configure :process "/dev/ttyS0" :speed 1200) |
| 2686 | 2686 | ||
| 2687 | \(serial-process-configure | 2687 | (serial-process-configure |
| 2688 | :buffer "COM1" :stopbits 1 :parity \\='odd :flowcontrol \\='hw) | 2688 | :buffer "COM1" :stopbits 1 :parity \\='odd :flowcontrol \\='hw) |
| 2689 | 2689 | ||
| 2690 | \(serial-process-configure :port "\\\\.\\COM13" :bytesize 7) | 2690 | (serial-process-configure :port "\\\\.\\COM13" :bytesize 7) |
| 2691 | 2691 | ||
| 2692 | usage: (serial-process-configure &rest ARGS) */) | 2692 | usage: (serial-process-configure &rest ARGS) */) |
| 2693 | (ptrdiff_t nargs, Lisp_Object *args) | 2693 | (ptrdiff_t nargs, Lisp_Object *args) |
| @@ -2781,13 +2781,13 @@ is available via the function `process-contact'. | |||
| 2781 | 2781 | ||
| 2782 | Examples: | 2782 | Examples: |
| 2783 | 2783 | ||
| 2784 | \(make-serial-process :port "/dev/ttyS0" :speed 9600) | 2784 | (make-serial-process :port "/dev/ttyS0" :speed 9600) |
| 2785 | 2785 | ||
| 2786 | \(make-serial-process :port "COM1" :speed 115200 :stopbits 2) | 2786 | (make-serial-process :port "COM1" :speed 115200 :stopbits 2) |
| 2787 | 2787 | ||
| 2788 | \(make-serial-process :port "\\\\.\\COM13" :speed 1200 :bytesize 7 :parity \\='odd) | 2788 | (make-serial-process :port "\\\\.\\COM13" :speed 1200 :bytesize 7 :parity \\='odd) |
| 2789 | 2789 | ||
| 2790 | \(make-serial-process :port "/dev/tty.BlueConsole-SPP-1" :speed nil) | 2790 | (make-serial-process :port "/dev/tty.BlueConsole-SPP-1" :speed nil) |
| 2791 | 2791 | ||
| 2792 | usage: (make-serial-process &rest ARGS) */) | 2792 | usage: (make-serial-process &rest ARGS) */) |
| 2793 | (ptrdiff_t nargs, Lisp_Object *args) | 2793 | (ptrdiff_t nargs, Lisp_Object *args) |
| @@ -5031,12 +5031,18 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 5031 | for (channel = 0; channel <= max_input_desc; ++channel) | 5031 | for (channel = 0; channel <= max_input_desc; ++channel) |
| 5032 | { | 5032 | { |
| 5033 | struct fd_callback_data *d = &fd_callback_info[channel]; | 5033 | struct fd_callback_data *d = &fd_callback_info[channel]; |
| 5034 | if (d->func | 5034 | if (d->func) |
| 5035 | && ((d->condition & FOR_READ | 5035 | { |
| 5036 | && FD_ISSET (channel, &Available)) | 5036 | if (d->condition & FOR_READ |
| 5037 | || (d->condition & FOR_WRITE | 5037 | && FD_ISSET (channel, &Available)) |
| 5038 | && FD_ISSET (channel, &write_mask)))) | 5038 | { |
| 5039 | d->func (channel, d->data); | 5039 | d->func (channel, d->data); |
| 5040 | FD_CLR (channel, &Available); | ||
| 5041 | } | ||
| 5042 | else if (d->condition & FOR_WRITE | ||
| 5043 | && FD_ISSET (channel, &write_mask)) | ||
| 5044 | d->func (channel, d->data); | ||
| 5045 | } | ||
| 5040 | } | 5046 | } |
| 5041 | 5047 | ||
| 5042 | for (channel = 0; channel <= max_process_desc; channel++) | 5048 | for (channel = 0; channel <= max_process_desc; channel++) |
| @@ -6269,7 +6275,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */) | |||
| 6269 | { | 6275 | { |
| 6270 | Lisp_Object process_number | 6276 | Lisp_Object process_number |
| 6271 | = string_to_number (SSDATA (process), 10, 1); | 6277 | = string_to_number (SSDATA (process), 10, 1); |
| 6272 | if (INTEGERP (process_number) || FLOATP (process_number)) | 6278 | if (NUMBERP (process_number)) |
| 6273 | tem = process_number; | 6279 | tem = process_number; |
| 6274 | } | 6280 | } |
| 6275 | process = tem; | 6281 | process = tem; |
| @@ -6694,10 +6700,12 @@ status_notify (struct Lisp_Process *deleting_process, | |||
| 6694 | p->update_tick = p->tick; | 6700 | p->update_tick = p->tick; |
| 6695 | /* Now output the message suitably. */ | 6701 | /* Now output the message suitably. */ |
| 6696 | exec_sentinel (proc, msg); | 6702 | exec_sentinel (proc, msg); |
| 6703 | if (BUFFERP (p->buffer)) | ||
| 6704 | /* In case it uses %s in mode-line-format. */ | ||
| 6705 | bset_update_mode_line (XBUFFER (p->buffer)); | ||
| 6697 | } | 6706 | } |
| 6698 | } /* end for */ | 6707 | } /* end for */ |
| 6699 | 6708 | ||
| 6700 | update_mode_lines = 24; /* In case buffers use %s in mode-line-format. */ | ||
| 6701 | return got_some_output; | 6709 | return got_some_output; |
| 6702 | } | 6710 | } |
| 6703 | 6711 | ||
| @@ -7294,7 +7302,7 @@ DEFUN ("process-attributes", Fprocess_attributes, | |||
| 7294 | 7302 | ||
| 7295 | Value is an alist where each element is a cons cell of the form | 7303 | Value is an alist where each element is a cons cell of the form |
| 7296 | 7304 | ||
| 7297 | \(KEY . VALUE) | 7305 | (KEY . VALUE) |
| 7298 | 7306 | ||
| 7299 | If this functionality is unsupported, the value is nil. | 7307 | If this functionality is unsupported, the value is nil. |
| 7300 | 7308 | ||