(wait_reading_process_output): Wait on gpm_fd too.
(add_gpm_wait_descriptor, delete_gpm_wait_descriptor)): New functions.
(add_gpm_wait_descriptor_called_flag): New variable.
(delete_keyboard_wait_descriptor): Check gpm_wait_mask.
When EIO happens, clear channel from descriptor masks before raising
SIGCHLD signal to avoid busy loop between read and sigchld_handler.
(sigchld_handler): Remove sleep (2007-03-11 & 2007-03-26 changes).
Restores waiting_for_user_input_p to saved value.
(wait_reading_process_output): Unwind protect waiting_for_user_input_p
instead of save/restore old value on stack.
(deleted_pid_list): New variable to store the pids
of deleted processes. Declare it only if SIGCHLD is defined.
(init_process): Initialize it.
(syms_of_process): Staticpro it.
(Fdelete_process): Add pid of the deleted process to it. Check after
the addition and before the kill if the process is already stopped,
in which case it is deleted from the list and not killed.
(sigchld_handler): Define it only if SIGCHLD is. Search the process
that signaled Emacs in `deleted_pid_list' before `Vprocess_alist'.
Original idea by Stefan Monnier.
`raw_status_high', and `raw_status_low' with plain integers, and move
them to the end of the structure.
* alloc.c (allocate_process): Use PSEUDOVECSIZE to initialize the
pseudovector's size field so only the Lisp_Object fields get GC'd.
* process.c (update_status, make_process, Fdelete_process)
(Fprocess_status, list_processes_1, start_process_unwind)
(create_process, Fmake_network_process, server_accept_connection)
(wait_reading_process_output, send_process, Fprocess_running_child_p)
(process_send_signal, proc_encode_coding_system, Fprocess_send_eof)
(sigchld_handler, status_notify): Adjust to new non-Lisp fields for
`pid' and `raw_status'.
(Fprocess_id, Fsignal_process): Same, and additionally use floats when
representing PIDs that are larger than most-positive-fixnum.
Change arg "timeout" to "seconds" and allow both integer and float value.
Change arg "timeout-msec" to "millisec" and interpret" as milliseconds
rather than microseconds. Fix doc string accordingly.
(ifflag_table): Fix typo (IFF_OACTIV -> IFF_OACTIVE).
(Fnetwork_interface_info): Use HAVE_STRUCT_IFREQ_IFR_NETMASK
macro. Also try member ifr_addr when getting netmask.
(Qipv4, Qipv6): New vars.
(syms_of_process): Intern and staticpro them.
(Fformat_network_address): Handle 9 or 8 element vector as IPv6 address
with or without port number. Handle 4 element vector as IPv4 address
without port number.
(conv_sockaddr_to_lisp, get_lisp_to_sockaddr_size)
(conv_lisp_to_sockaddr): Handle IPv6 addresses.
(Fmake_network_process): Use :family 'ipv4 and 'ipv6 to explicitly
request that address family only. :family nil or omitted means to
determine address family from the specified :host and :service.
(server_accept_connection): Handle IPv6 addresses.
(init_process): Add (:family ipv4) and (:family ipv6) sub-features.
(ifflag_table): Add missing OpenBSD IFF_ flags.