diff options
| author | Richard M. Stallman | 1997-03-22 04:13:50 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-03-22 04:13:50 +0000 |
| commit | b5dc1c835ae86217462e0fc479ed79994bd91670 (patch) | |
| tree | ecfd32020c9f827c6710172e98f5292fa3c88a7d /src/process.c | |
| parent | e837058bc33ac4055f8456f71081692734217d20 (diff) | |
| download | emacs-b5dc1c835ae86217462e0fc479ed79994bd91670.tar.gz emacs-b5dc1c835ae86217462e0fc479ed79994bd91670.zip | |
(wait_reading_process_input): If wait_for_cell,
ignore subprocess input and respond only to keyboard.
(non_process_wait_mask): New variable.
(add_keyboard_wait_descriptor): Update it.
(delete_keyboard_wait_descriptor): Update it.
(init_process): Initialize it.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/process.c b/src/process.c index fe1cd20c1c0..1d4fa70b52e 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -224,6 +224,10 @@ static SELECT_TYPE input_wait_mask; | |||
| 224 | 224 | ||
| 225 | static SELECT_TYPE non_keyboard_wait_mask; | 225 | static SELECT_TYPE non_keyboard_wait_mask; |
| 226 | 226 | ||
| 227 | /* Mask that excludes process input descriptor (s). */ | ||
| 228 | |||
| 229 | static SELECT_TYPE non_process_wait_mask; | ||
| 230 | |||
| 227 | /* The largest descriptor currently in use for a process object. */ | 231 | /* The largest descriptor currently in use for a process object. */ |
| 228 | static int max_process_desc; | 232 | static int max_process_desc; |
| 229 | 233 | ||
| @@ -2294,7 +2298,9 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 2294 | 2298 | ||
| 2295 | /* Wait till there is something to do */ | 2299 | /* Wait till there is something to do */ |
| 2296 | 2300 | ||
| 2297 | if (! XINT (read_kbd) && wait_for_cell == 0) | 2301 | if (wait_for_cell) |
| 2302 | Available = non_process_wait_mask; | ||
| 2303 | else if (! XINT (read_kbd)) | ||
| 2298 | Available = non_keyboard_wait_mask; | 2304 | Available = non_keyboard_wait_mask; |
| 2299 | else | 2305 | else |
| 2300 | Available = input_wait_mask; | 2306 | Available = input_wait_mask; |
| @@ -4041,6 +4047,7 @@ add_keyboard_wait_descriptor (desc) | |||
| 4041 | FD_CLR (0, &input_wait_mask); | 4047 | FD_CLR (0, &input_wait_mask); |
| 4042 | add_keyboard_wait_descriptor_called_flag = 1; | 4048 | add_keyboard_wait_descriptor_called_flag = 1; |
| 4043 | FD_SET (desc, &input_wait_mask); | 4049 | FD_SET (desc, &input_wait_mask); |
| 4050 | FD_SET (desc, &non_process_wait_mask); | ||
| 4044 | if (desc > max_keyboard_desc) | 4051 | if (desc > max_keyboard_desc) |
| 4045 | max_keyboard_desc = desc; | 4052 | max_keyboard_desc = desc; |
| 4046 | } | 4053 | } |
| @@ -4055,6 +4062,7 @@ delete_keyboard_wait_descriptor (desc) | |||
| 4055 | int lim = max_keyboard_desc; | 4062 | int lim = max_keyboard_desc; |
| 4056 | 4063 | ||
| 4057 | FD_CLR (desc, &input_wait_mask); | 4064 | FD_CLR (desc, &input_wait_mask); |
| 4065 | FD_CLR (desc, &non_process_wait_mask); | ||
| 4058 | 4066 | ||
| 4059 | if (desc == max_keyboard_desc) | 4067 | if (desc == max_keyboard_desc) |
| 4060 | for (fd = 0; fd < lim; fd++) | 4068 | for (fd = 0; fd < lim; fd++) |
| @@ -4093,6 +4101,7 @@ init_process () | |||
| 4093 | 4101 | ||
| 4094 | FD_ZERO (&input_wait_mask); | 4102 | FD_ZERO (&input_wait_mask); |
| 4095 | FD_ZERO (&non_keyboard_wait_mask); | 4103 | FD_ZERO (&non_keyboard_wait_mask); |
| 4104 | FD_ZERO (&non_process_wait_mask); | ||
| 4096 | max_process_desc = 0; | 4105 | max_process_desc = 0; |
| 4097 | 4106 | ||
| 4098 | FD_SET (0, &input_wait_mask); | 4107 | FD_SET (0, &input_wait_mask); |