1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-02 10:11:05 -08:00
Commit graph

454 commits

Author SHA1 Message Date
Andreas Schwab
41c4895cd7 (send_process): Move misplaced volatile. 2005-05-22 09:49:43 +00:00
Andreas Schwab
edceb51cbc (send_process): Remove misplaced volatile. 2005-05-22 09:35:04 +00:00
Eli Zaretskii
0ff692700b (send_process): Restore the SIGPIPE handler if we catch a SIGPIPE. 2005-05-21 11:58:49 +00:00
Richard M. Stallman
c8f440050a (send_process_trap): Unblock SIGPIPE.
(send_process): Reset SIGPIPE handler before reporting error.
2005-05-14 14:06:33 +00:00
Stefan Monnier
c1120f9404 (Vfile_name_coding_system, Vdefault_file_name_coding_system):
Remove unused declarations.
2005-03-24 19:14:05 +00:00
YAMAMOTO Mitsuharu
ecc175e254 (init_process): Change #ifdef DARWIN' to #if defined (DARWIN) ||
defined (MAC_OSX)'
2005-03-16 08:09:28 +00:00
Steven Tamm
d9e7c62260 * s/darwin.h: Removed PTY_ITERATION from here.
(DARWIN): Defined.
* process.c (init_process): Default process-connection-type to
	nil on darwin 6 or less, t if it is 7 or higher.  This way the
	broken pty behavior is still allowed on darwin 6 for interactive
	processes for people that know what they are doing.
2005-01-22 15:54:04 +00:00
Richard M. Stallman
ec2258fa88 (list_processes_1): Set undo_list instead of calling Fbuffer_undo_list. 2004-12-27 16:06:43 +00:00
Jan Djärv
333f1b6f78 * syssignal.h: Declare main_thread.
(SIGNAL_THREAD_CHECK): New macro.

* keyboard.c (input_available_signal): Move thread checking code
to macro SIGNAL_THREAD_CHECK and call that macro.
(interrupt_signal): Call SIGNAL_THREAD_CHECK.

* alloc.c (uninterrupt_malloc): Move main_thread to emacs.c.

* emacs.c: Define main_thread.
(main): Initialize main_thread.
(handle_USR1_signal, handle_USR2_signal, fatal_error_signal)
(memory_warning_signal): Call SIGNAL_THREAD_CHECK.

* floatfns.c (float_error): Call SIGNAL_THREAD_CHECK.

* dispnew.c (window_change_signal): Call SIGNAL_THREAD_CHECK.

* sysdep.c (select_alarm): Call SIGNAL_THREAD_CHECK.

* process.c (send_process_trap, sigchld_handler): Call
SIGNAL_THREAD_CHECK.

* data.c (arith_error): Call SIGNAL_THREAD_CHECK.

* atimer.c (alarm_signal_handler): Call SIGNAL_THREAD_CHECK.
2004-12-15 21:40:41 +00:00
Kim F. Storm
eb943af045 (Fmake_network_process): Remove unused var 'retry'. 2004-11-09 11:15:46 +00:00
Kim F. Storm
4e9dd03b8c (Fmake_network_process): Remove kludge for interrupted
connects on BSD.  If connect is interrupted, just close socket and
start over rather than sleeping and retry with same socket.
2004-11-09 09:40:37 +00:00
Kim F. Storm
bad49fc7c2 (connect_wait_mask, num_pending_connects): Only
declare and use them if NON_BLOCKING_CONNECT is defined.
(IF_NON_BLOCKING_CONNECT): New helper macro.
(wait_reading_process_output): Only declare and use local vars
Connecting and check_connect when NON_BLOCKING_CONNECT is defined.
(init_process): Initialize them if NON_BLOCKING_CONNECT defined.
2004-11-01 11:04:37 +00:00
Kenichi Handa
9de36315db (send_process): Be sure to free composition data. 2004-09-29 23:43:48 +00:00
Richard M. Stallman
f1c206fcfb (process_send_signal) [SIGNALS_VIA_CHARACTERS, HAVE_TERMIOS]:
If there's no char for this signal, drop through and use system calls.
2004-08-22 17:45:36 +00:00
Kim F. Storm
214d60691b (wait_reading_process_output): Rename from
wait_reading_process_input.  All uses changed.
(wait_reading_process_output_1): Rename from
wait_reading_process_input_1.  All uses changed.
2004-08-20 10:33:25 +00:00
Kim F. Storm
b89a415ab1 * process.c (wait_reading_process_input): Clean up.
Add wait_for_cell, wait_proc, and just_wait_proc args
to avoid overloading `read_kbd' and `do_display' args.
Change read_kbd arg to int.  All callers changed.
2004-08-19 13:57:17 +00:00
Kim F. Storm
ca4313d5ab (process_send_signal): Use CDISABLE. 2004-08-19 10:08:00 +00:00
Kim F. Storm
107ed38d4b (Faccept_process_output): Add arg JUST-THIS-ONE;
forward to wait_reading_process_input via DO_DISPLAY arg.
(wait_reading_process_input): If DO_DISPLAY < 0 for a process
object, only process output from that process; also inhibit
running timers if DO_DISPLAY==-2.
2004-08-17 22:24:29 +00:00
Kim F. Storm
be16bf871e (process_send_signal): Fix last change--use
_POSIX_VDISABLE instead of CVDISABLE when available.
2004-08-17 21:59:07 +00:00
Richard M. Stallman
7f916a363e (process_send_signal) [SIGNALS_VIA_CHARACTERS, HAVE_TERMIOS]: Clean up.
Do nothing if the character is CVDISABLE.
2004-08-16 22:57:26 +00:00
Kim F. Storm
39b1da208b (read_process_output): Use whole read buffer.
Don't trigger adaptive read buffering on errors.
2004-08-01 23:10:06 +00:00
Steven Tamm
e082ac9deb Fixes for Ctrl-G support on carbon, replacing old timeout based polling
with alarm based polling.
mac.c (sys_select): Redo sys_select to use alarm-based
polling instead of 1 sec timeouts (like solaris).
macterm.c (x_make_frame_visible): Comment in polling on
frame creation.
keyboard.c: Undef SIGIO on Carbon
atimer.c (alarm_signal_handler): Call alarm handlers after
scheduling.
eval.c (Feval): Remove quit_char test
process.c (wait_reading_process_input): Remove clearing
stdin for select call on process input
2004-07-19 04:42:43 +00:00
Richard M. Stallman
04391069ec Comment change. 2004-06-13 22:37:07 +00:00
Kim F. Storm
116c423ca5 (Fdelete_process): Undo 2004-05-28 change.
Instead, call status_notify also for network process.
(status_message): Use process instead of status as arg.
Give messages "deleted" or "connection broken by remote peer" for
an exited network process.
(status_notify): Change call to status_message.
(read_process_output): Increase readmax to 4096.  Do not increase
buffer size for datagram channels (default is now large enough).
2004-06-06 22:17:53 +00:00
Noah Friedman
33594a8d34 process.c (Fdelete_process): Do not call remove_process. 2004-05-28 21:58:31 +00:00
Kim F. Storm
1566f511f1 (wait_reading_process_input): Check connect_wait_mask
before actually accepting connection in case it has already been
accepted due to recursion.
2004-05-25 11:17:43 +00:00
Kim F. Storm
855448dc19 (wait_reading_process_input): Make reentrant.
Make Available and Connecting non-static.  Save and restore value
of waiting_for_user_input_p.
2004-05-13 23:07:07 +00:00
Kim F. Storm
d7d2483aed (read_process_output): Grow decoding_buf when needed;
this could cause a crash in allocate_string and compact_small_strings.
2004-05-11 15:16:10 +00:00
Juanma Barranquero
553acde508 (Fstart_process): Fix docstring. 2004-05-10 17:47:38 +00:00
Juanma Barranquero
f3d9532b1a (Fwaiting_for_user_input_p, Fmake_network_process)
(Fset_process_query_on_exit_flag, Vprocess_adaptive_read_buffering):
Fix spelling of Emacs on docstring.
(Fset_process_coding_system, Fprocess_coding_system)
(Fset_process_filter_multibyte, Fprocess_filter_multibyte_p):
Make argument names match their use in docstring.
(Fprocess_id, Fprocess_query_on_exit_flag, Finterrupt_process):
Fix docstring.
2004-05-08 16:11:42 +00:00
Kim F. Storm
3af5525137 (wait_reading_process_input): Don't do adaptive read
buffering if waiting for a specific process.
2004-02-06 23:52:36 +00:00
Jan Djärv
ce38070aa2 * process.c (sigchld_handler): Add comment about not calling malloc 2004-01-27 21:34:43 +00:00
Jan Djärv
c22aeff8e8 (sigchld_handler): Set synch_process_termsig
if terminated by a signal.  synch_process_death setting removed.
2004-01-26 23:39:30 +00:00
Stefan Monnier
43ff45a00d (wait_reading_process_input) [SYNC_INPUT]: Check interrupt_input_pending. 2004-01-21 05:27:58 +00:00
Stefan Monnier
9076a82311 (wait_reading_process_input): Lisp_Object/int mixup. 2004-01-20 21:19:33 +00:00
Kim F. Storm
05b72afdef (read_process_output): Only activate adaptive
buffering if we read less than 256 bytes at a time.
2004-01-06 23:34:45 +00:00
Kim F. Storm
2d942bfadf (ADAPTIVE_READ_BUFFERING): New conditional.
(READ_OUTPUT_DELAY_INCREMENT, READ_OUTPUT_DELAY_MAX)
(READ_OUTPUT_DELAY_MAX_MAX): New constants.
(process_output_delay_count, process_output_skip): New vars.
(Vprocess_adaptive_read_buffering): New variable.
(make_process): Initialize adaptive read buffering members.
(Fstart_process): Set adaptive_read_buffering member.
(deactivate_process): Cleanup adaptive read buffering.
(wait_reading_process_input): Temporarily omit delayed
subprocesses from the set of file descriptors to read from;
adjust the select timeout if we skipped any subprocesses.
(read_process_output): Increase adaptive read buffering delay if
we read less than a full buffer; reduce delay when we read a
full buffer.
(send_process): Simplify using local Lisp_Process var.
Reset adaptive read buffering delay after write.
(init_process): Initialize process_output_delay_count and
process_output_skip.
(syms_of_process): DEFVAR_LISP Vprocess_adaptive_read_buffering.
2004-01-01 23:34:14 +00:00
Jan Djärv
7c40296995 Remove period at end of error message. 2003-11-16 16:17:09 +00:00
Kenichi Handa
2d0f37d68c (send_process): Delete unused temp_buf. 2003-09-27 00:25:40 +00:00
Kim F. Storm
151ec9e26f (set_socket_option): Fix :bindtodevice option.
(Fset_network_process_option): Update process contact list when
setting option succeeds.
(Fmake_network_process): Doc fix.
2003-09-23 21:57:51 +00:00
Dave Love
559c53b384 (Fnetwork_interface_info): Use
HAVE_STRUCT_IFREQ... macros.
2003-09-23 12:40:39 +00:00
Dave Love
e128399941 (Fnetwork_interface_info): Fix type error.
(Fnetwork_interface_list): Doc fix.
(read_process_output, read_process_output): Delete unused var.
2003-09-18 10:40:04 +00:00
Kim F. Storm
b8c7fd71a2 (Fnetwork_interface_list, Fnetwork_interface_info):
Require HAVE_NET_IF_H and HAVE_SYS_IOCTL_H to include these fns.
(Fnetwork_interface_info): Check that ifreq struct has required
fields before accessing them; this requires that those fields are
defined as macros, which may be too restrictive on some platforms,
but it is better than failing on other platforms.
(syms_of_process): Only defsubr above fns when included.
2003-09-17 21:32:35 +00:00
Kim F. Storm
2ccf3102d2 (Fset_process_sentinel): Add sentinel to childp plist
for network process.
(socket_options): Add `:' prefix to option names.  Add optbit field.
(set_socket_option): Remove no_error arg and special handling of s < 0.
Return 1<<optbit for known option, 0 for unknown.
Do not interpret 0 as false for boolean option (only nil).
Pass failed option and value to report_file_error.
(Fset_network_process_options): Replaced by Fset_network_process_option.
(Fset_network_process_option): New function to set just one option.
(Fmake_network_process): Allow :coding arg to be a cons.
Allow :server arg to be an integer specifying backlog size.
Remove :options arg, and allow options to be specified directly
as :KEY, VALUE pairs.  Parse these options before binding socket.
As before, :reuseaddr t is default for a server process, but this
can now be disabled by specifying :reuseaddr nil.
(Fnetwork_interface_info): Rename from Fget_network_interface_info.
(init_process): Availability of network options is now checked with
simpler syntax (featurep 'make-network-process :OPTION); use loop to
setup features.
(syms_of_process): Fix defsubr's for the replaced functions.
2003-09-16 23:05:24 +00:00
Kim F. Storm
161933c7a7 [HAVE_SOCKETS]: Include sys/ioctl.h and net/if.h.
(Fnetwork_interface_list, Fget_network_interface_info): New defuns.
(syms_of_process): Defsubr them.
2003-09-13 23:34:33 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Kenichi Handa
e430e5baa0 (read_process_output): Return the actually read bytes
instead of the result of decoding.
2003-07-31 01:24:44 +00:00
Richard M. Stallman
2601f59e10 (wait_reading_process_input): Don't signal SIGIO in batch mode. 2003-06-22 00:04:49 +00:00
Stefan Monnier
26d7389d54 (allocate_pty): Revert part of the previous patch.
(Faccept_process_output): Simplify.
2003-06-04 23:21:11 +00:00
Stefan Monnier
34967d0ff4 (allocate_pty): Remove `unused var stb' and
`cp might be used uninitialized' warnings.
2003-05-25 17:43:20 +00:00