Handle multiple keyboard input descriptors.
(non_keyboard_wait_mask): New variable. (Fset_process_filter): Update non_keyboard_wait_mask (create_process, Fopen_network_stream, deactivate_process): (init_process, sigchld_handler): Likewise. (wait_reading_process_input): Maybe use non_keyboard_wait_mask. (add_keyboard_wait_descriptor): Renamed from change_keyboard_wait_descriptor. Clear the old descriptor's bit only the first call. (delete_keyboard_wait_descriptor): New function. (keyboard_bit_set): New function. (wait_reading_process_input): Use keyboard_bit_set. Start the loop over process descs from 0, and explicitly ignore non-process input descs. (init_process): Don't init keyboard_descriptor. (keyboard_descriptor): Variable deleted. (add_keyboard_wait_descriptor): Don't set keyboard_descriptor. (delete_keyboard_wait_descriptor): New function.
Showing with 86 additions and 26 deletions