1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-12 22:40:46 -08:00
Commit graph

431 commits

Author SHA1 Message Date
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
David Kastrup
4771444172 (read_process_output): Back out change from 2003-03-09. 2003-05-17 20:03:22 +00:00
David Kastrup
9e25126f0b (read_process_output): We have allocated enough space
for readmax and carryover, so actually use the alloted space.
2003-03-09 22:48:08 +00:00
Jan Djärv
1678225877 Removed subtty, workaround for when TIOCSIGSEND fails. 2003-02-21 18:13:53 +00:00
Juanma Barranquero
19310311a7 (wait_reading_process_input): Use POLL_INTERRUPTED_SYS_CALL, not
POLLING_PROBLEM_IN_SELECT.
2003-02-21 08:05:55 +00:00
Kenichi Handa
20f1ef2e3a (setup_process_coding_systems): If the process's
in/out descriptor is -1, do nothing.
2003-02-20 01:54:27 +00:00
Kim F. Storm
7392e23cf9 Doc fixes.
(syms_of_process): Add `:' prefix to QCfilter_multibyte.
2003-02-10 13:51:59 +00:00
Kenichi Handa
03f0441359 (QCfilter_multibyte): New variable.
(setup_process_coding_systems): New function.
(Fset_process_buffer, Fset_process_filter): Call
setup_process_coding_systems.
(Fstart_process): Initialize the member `filter_multibyte' of
struct Lisp_Process.
(create_process): Call setup_process_coding_systems.
(Fmake_network_process): New keyward `:filter-multibyte'.
Initialize the member `filter_multibyte' of struct Lisp_Process.
Call setup_process_coding_systems.
(server_accept_connection): Call setup_process_coding_systems.
(read_process_output): If the process has a filter, decide the
multibyteness of a string to given to the filter by
`filter_multibyte' member of the process.  If the process doesn't
have a filter and the result of conversion is unibyte, use
Fstring_to_multibyte (not Fstring_make_multibyte) to get the
multibyte form.
(Fset_process_coding_system): Call setup_process_coding_systems.
(Fset_process_filter_multibyte): New function.
(Fprocess_filter_multibyte_p): New function.
(syms_of_process): Intern and staticpro QCfilter_multibyte.
Defsubr Sset_process_filter_multibyte and
Sprocess_filter_multibyte_p.
2003-02-10 07:58:29 +00:00
Juanma Barranquero
177c0ea743 Trailing whitespace deleted. 2003-02-04 14:56:31 +00:00
Kim F. Storm
3452df9e69 (set-process-filter): Document unibyte/multibyte-ness of string argument. 2003-01-16 12:59:18 +00:00
Kim F. Storm
26a086c6a4 (Fset_process_plist): Fixed return value. 2003-01-14 13:36:14 +00:00
Kim F. Storm
faa7db081a Reworked 2003-01-12 change -- call a plist a plist!
(QCplist): Renamed from QCvars.  All uses changed.
(Fprocess_plist): Replaces Fprocess_variable.  Simplified.
(Fset_process_plist): Replaces Fset_process_variable.  Simplified.
(syms_of_process): Intern, staticpro, defsubr these.
(Fmake_network_process): Describe :plist arg.  Removed :vars arg.
2003-01-14 09:55:50 +00:00
Kim F. Storm
ac4a75846b (QCvars): New variable.
(syms_of_process): Intern and staticpro it.
(Fprocess_variable, Fset_process_variable): New functions.
(syms_of_process): Defsubr them.
(Fstart_process): Initialize private_vars plist to nil.
(Fmake_network_process): New arg :vars to setup the private
variables for new network process.
(server_accept_connection): Copy server's private variables to
client process.
2003-01-12 20:24:06 +00:00
Kim F. Storm
365aee8238 (Fset_process_contact): New function.
(syms_of_process): defsubr it.
(make-network-process): Update doc.
2003-01-10 22:24:41 +00:00
Kim F. Storm
21bd170dde (Fmake_network_process): Convert new port number
to host byte order for `:service t' case.  From Mario Lang.
2003-01-08 22:16:12 +00:00
Kim F. Storm
0dccee41bd (format-network-address): Added optional OMIT-PORT arg. Callers changed. 2003-01-08 15:35:03 +00:00
Kim F. Storm
2185db0450 (server_accept_connection): Fixed recording of new
connection's local address in :local property of contact info.
(Fmake_network_process): Record local network address for new
client processes in :local property of contact info.
2003-01-08 10:38:06 +00:00
Dave Love
1fc84d77bb (_GNU_SOURCE): Don't define. 2002-11-18 15:40:28 +00:00
Kim F. Storm
9a9e711ed3 (Fformat_network_address): Removed unused locals p, cp, and i. 2002-11-07 23:18:45 +00:00
Richard M. Stallman
454fd6b4ef (wait_reading_process_input):
Test POLLING_PROBLEM_IN_SELECT, not hpux.
Avoid initialization for auto Lisp_Object var.
2002-11-06 05:01:46 +00:00
Stefan Monnier
8d2ff84085 (Fformat_network_address): Fix int/Lisp_Object mixup. 2002-10-31 16:22:07 +00:00
Dave Love
e62cab61d5 Include sys/wait.h.
[HAVE_PTY_H]; Include pty.h.
2002-10-30 19:16:32 +00:00
Kim F. Storm
cdd5ea86db (Fsignal_process): Allow PROCESS to be specified by
name in addition to pid (as integer or string).
2002-10-28 23:18:50 +00:00
Kim F. Storm
991234f01a (Fformat_network_address): New function.
(syms_of_process): Defsubr it.
(list_processes_1): Use it to format :local/:remote address if
service/host is not set; before emacs would crash in that case.
(Fmake_network_process): Don't use Ffind_operation_coding_system
to setup coding system if host or service is not set.
2002-10-24 08:03:41 +00:00