1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 15:00:45 -08:00
Commit graph

516 commits

Author SHA1 Message Date
Stefan Monnier
e6fca84363 (Fstart_process, Fmake_network_process, read_process_output):
Fix up last changes.
2007-07-17 05:57:35 +00:00
Jason Rumney
5e1ab61368 Don't undefine AF_INET6. 2007-07-14 23:04:56 +00:00
Stefan Monnier
60f0fb11dd (struct Lisp_Process): Turn slots infd, outfd, kill_without_query, pty_flag,
tick, update_tick, decoding_carryover, inherit_coding_system_flag,
filter_multibyte, adaptive_read_buffering, read_output_delay, and
read_output_skip from Lisp_Objects to ints.  Remove unused
encoding_carryover.
2007-07-12 06:36:57 +00:00
Nick Roberts
994d9841e1 (gpm_wait_mask, max_gpm_desc): New variables.
(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.
2007-05-20 02:41:19 +00:00
Richard M. Stallman
16fdeb17a2 (Fstart_process): Doc fix. 2007-04-23 21:27:40 +00:00
Eli Zaretskii
4b6c5eee9a (Fstart_process): Doc fix. 2007-04-23 09:02:08 +00:00
Kim F. Storm
4740825c2f (wait_reading_process_output) [HAVE_PTYS]:
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).
2007-03-29 21:24:38 +00:00
Juanma Barranquero
cbf23adbc6 (Fformat_network_address): Return nil when the
argument vector contains invalid values.
2007-03-29 13:58:40 +00:00
Juanma Barranquero
ded8366570 (Fformat_network_address): Make room in args array to format IPv6 addresses. 2007-03-27 15:19:33 +00:00
Sam Steingold
8f0e1e444f (sigchld_handler): Delay by 1ms instead of 1s to
alleviate sluggishness (the original problem is still fixed).
2007-03-26 02:29:08 +00:00
Sam Steingold
e7d4a90405 revert the last patch to the original fix: sleep BEFORE the first wait
it appears to be absolutely necessary for prevention of the load surge
2007-03-25 03:03:40 +00:00
YAMAMOTO Mitsuharu
54b3b62f17 (Fmake_network_process) [HAVE_GETADDRINFO]: Clear
immediate_quit before calling freeaddrinfo.  Add BLOCK_INPUT
around freeaddrinfo.
2007-03-20 08:51:03 +00:00
Chong Yidong
29ed4d512b (Fdelete_process): Properly handle deletion of first element of
deleted_pid_list.
(create_process): Declare pid as pid_t.
(sigchld_handler): Avoid busyloop.
2007-03-17 18:24:46 +00:00
Chong Yidong
8e050977ee (sigchld_handler): Change type of pid to pid_t. Scan deleted_pid_list
explicitly to avoid using Fmember which don't know about mark bits and
make_fixnum_or_float which may malloc.  Reported by Andreas Schwab.
2007-03-17 18:16:03 +00:00
Sam Steingold
9b73fa0b88 tweak last patch: add comment and avoid the first sleep 2007-03-11 21:08:45 +00:00
Sam Steingold
ece29e38e4 (sigchld_handler): Sleep before wait3 to avoid a busyloop. 2007-03-11 18:16:50 +00:00
Kenichi Handa
faa6ce91bf (send_process_object): Check the process status and
signal an error if something is wrong.
2007-03-01 10:18:25 +00:00
Kenichi Handa
8d4e7254fc (send_process_object_unwind): New function.
(send_process_object): New function.
(Fprocess_send_region): Call send_process_object.
(Fprocess_send_string): Likewise.
2007-02-23 03:44:37 +00:00
Glenn Morris
4e6835dbc4 Add 2007 to copyright years. 2007-01-21 04:57:37 +00:00
Eli Zaretskii
d30fe7798a (Fdelete_process, Fprocess_id, sigchld_handler): Copy PID into EMACS_INT
to avoid GCC warnings.
2007-01-13 21:58:23 +00:00
Kim F. Storm
d7e344cda1 Fix typo in comment. 2006-12-27 21:46:25 +00:00
Kim F. Storm
324e68ba20 (Qsignal): Declare here.
(syms_of_process): Intern or staticpro it.
2006-12-19 15:37:34 +00:00
Eli Zaretskii
648f6edf03 (Fsignal_process): Doc fix. Use XFLOAT_DATA to extract the process ID from
a Lisp float.
2006-12-09 22:00:18 +00:00
Kim F. Storm
ec0f21f465 (parse_signal): Use xstricmp instead of strcasecmp.
(Fsignal_process): Don't use strncasecmp.
2006-12-07 11:12:21 +00:00
Kim F. Storm
59324b1dbc (parse_signal): Rename macro from handle_signal.
(Fsignal_process): Also accept lower-case variants of signal
names (to align with signal names generated by Emacs itself).
2006-12-04 15:21:39 +00:00
Kim F. Storm
d19c0a1c88 (Qsignal): Declare extern.
(syms_of_process): Don't intern/staticpro them here.

(read_process_output): Abort if carryover < 0.
2006-12-04 12:26:50 +00:00
Juanma Barranquero
d4e83d5c6c (syms_of_process) <delete-exited-processes>: Doc fix. 2006-11-12 22:32:14 +00:00
Kim F. Storm
1eed3bdcee (list_processes_1): Run sentinels before removing dead
processes.  Also remove `closed' network connections.
2006-10-03 09:14:40 +00:00
Richard M. Stallman
84af9896c3 (inhibit_sentinels): New variable.
(exec_sentinel): Test inhibit_sentinels.
(init_process): Initialize it.
2006-09-08 12:08:54 +00:00
Chong Yidong
42ec1561cf * process.c: Reapply 2006-08-01 change. 2006-08-05 01:38:42 +00:00
Chong Yidong
d634a67054 * process.c: Revert last change. 2006-08-03 15:19:20 +00:00
Kim F. Storm
2beb96f9cc (wait_reading_process_output_unwind): New function.
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.
2006-08-01 00:13:08 +00:00
Chong Yidong
7157b8fe89 Doc fix. 2006-07-10 18:51:42 +00:00
Kim F. Storm
a5cfdda8ad 2006-06-01 Michaël Cadilhac <michael.cadilhac@lrde.org>
(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.
2006-06-01 14:08:25 +00:00
Kim F. Storm
e1e541bdf1 (select_wrapper): Add wrapper around select to work around
"incomplete backtrace" bug in gdb 5.3, when emacs is stopped inside
select called from wait_reading_process_output.
2006-05-31 08:58:02 +00:00
Kenichi Handa
6b62b48dbd (setup_process_coding_systems): Use system_eol_type
for encoding if eol_type is not yet decided.
(read_process_output): Likewise.
(send_process): Likewise.
2006-05-08 05:19:42 +00:00
Richard M. Stallman
9d1a8e5da1 (conv_lisp_to_sockaddr): Fix previous change. 2006-04-13 01:08:27 +00:00
Richard M. Stallman
27448380dc (Fprocess_send_eof): Abort if fail to open null device. 2006-04-12 15:01:37 +00:00
Richard M. Stallman
6bf890d76a (conv_lisp_to_sockaddr): If FAMILY unknown, just return. 2006-04-12 15:00:32 +00:00
Stefan Monnier
6bfd98e75d * process.h (struct Lisp_Process): Replace Lisp_Objects `pid',
`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.
2006-04-08 15:07:35 +00:00
Kim F. Storm
5088da42b6 (Faccept_process_output): Fix to comply with lisp reference.
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.
2006-03-22 22:33:35 +00:00
Romain Francoise
635a349655 (Vprocess_adaptive_read_buffering): Doc fix. 2006-03-11 14:42:17 +00:00
Stefan Monnier
f523e0c3c5 (Fmake_network_process): Init the process's mark. 2006-02-25 16:49:00 +00:00
Thien-Thi Nguyen
aaef169dc6 Update years in copyright notice; nfc. 2006-02-06 15:23:23 +00:00
YAMAMOTO Mitsuharu
2026418cf3 [HAVE_INTTYPES_H]: Include inttypes.h.
(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.
2006-01-12 08:16:12 +00:00
Kim F. Storm
87b6ca8d4e (Fmake_network_process): Use AF_INET instead of
AF_UNSPEC when AF_INET6	is not defined.
2006-01-05 09:24:11 +00:00
Eli Zaretskii
805b043931 [WINDOWSNT]: Undef AF_INET6 to disable IPv6 support for w32. 2006-01-04 17:52:40 +00:00
Kim F. Storm
e1652a8612 Add IPv6 support.
(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.
2006-01-04 00:16:54 +00:00
Andreas Schwab
82a800588d (Fnetwork_interface_info): Correctly terminate the
loop over ifflag_table.
2005-12-30 11:03:41 +00:00
Kim F. Storm
675984ede6 (Fsignal_process): Recognize signal names with and
without SIG prefix, e.g. SIGHUP and HUP.
2005-11-08 21:38:37 +00:00