Commit graph

1503 commits

Author SHA1 Message Date
Karl Heuer
e07d54499f (wait_reading_process_input) [hpux]: Workaround for
annoying messages.
1996-07-13 17:50:47 +00:00
Richard M. Stallman
89d7280dcf Comment change. 1996-06-11 19:50:32 +00:00
Richard M. Stallman
0b75e9a419 (wait_reading_process_input): Move the O_NONBLOCK and
O_NDELAY conditionals out of the EWOULDBLOCK conditional.
1996-06-11 19:48:13 +00:00
Richard M. Stallman
e9bf058bce (create_process): Add DONT_OPEN_PTY conditional. 1996-06-09 20:15:20 +00:00
Richard M. Stallman
bff3ed0ac3 (Fopen_network_stream)[WINDOWSNT]: Ensure Windows
socket library is loaded if available.
1996-06-08 00:14:31 +00:00
Richard M. Stallman
7795ff9bc0 (Fopen_network_stream): Set process infd to inch.
(create_process, read_process_output, Fsignal_process) [WINDOWSNT]:
Remove conditional NT code.
1996-04-26 19:55:27 +00:00
Richard M. Stallman
f854a00b99 (wait_reading_process_input, both definitions):
If wait_for_cell, don't call timer_check, and use
detect_input_pending instead of detect_input_pending_run_timers.
1996-04-23 20:32:33 +00:00
Richard M. Stallman
1861b21427 (wait_reading_process_input) [!subprocesses]:
Get rid of the loop around the detect_input_pending call.
1996-04-15 19:12:01 +00:00
Richard M. Stallman
0a65b03282 (wait_reading_process_input) [!subprocesses]: Handle
the case of READ_KBD being a cons cell.  Retry the timer check
after a timer fired.  (All of these make this definition
consistent with the one that supports async subprocesses.)

(wait_reading_process_input, both definitions):
Use plain detect_input_pending just before the select call.
1996-04-14 17:45:31 +00:00
Richard M. Stallman
3d6163992d (wait_reading_process_input, both definitions):
Don't call detect_input_pending; use detect_input_pending_run_timers.
1996-04-12 06:02:54 +00:00
Richard M. Stallman
4abca5e732 (wait_reading_process_input): Don't call
wait_reading_process_input_1 if time_limit is -1.
1996-04-03 19:30:03 +00:00
Richard M. Stallman
c573ae8ec0 (wait_reading_process_input_1): New (empty) function.
(wait_reading_process_input): Call wait_reading_process_input_1.
If timer_check runs some timers, retry it.
1996-03-27 02:35:15 +00:00
Richard M. Stallman
38f17cb22e (wait_reading_process_input): Eliminate bogus test
that was trying to check read_kbd and failing.
1996-03-22 22:06:10 +00:00
Richard M. Stallman
501ebe0e34 (wait_reading_process_input): Extract the number from read_kbd with XINT. 1996-03-19 23:43:50 +00:00
Karl Heuer
f694e5d271 (wait_reading_process_input) [! subprocesses]: Run
timers and redisplay if they were run, like the code for systems
which support subprocesses does.
1996-03-14 05:20:44 +00:00
Richard M. Stallman
bae8d1375f [!subprocesses] (wait_reading_process_input):
Port the timer changes from the other wait_reading_process_input.
1996-03-10 14:38:37 +00:00
Richard M. Stallman
5de50bfbba (wait_reading_process_input):
Redisplay after timer_check if timers were actually run.
1996-03-08 03:51:46 +00:00
Richard M. Stallman
5d6c2aa300 (wait_reading_process_input):
Pass DO_DISPLAY to detect_input_pending_run_timers.

(Fopen_network_stream): Set immediate_quit around gethostbyname.
1996-03-05 17:33:27 +00:00
Richard M. Stallman
e643c5beab (wait_reading_process_input): Use getpid when generating SIGIO. 1996-03-03 05:34:59 +00:00
Richard M. Stallman
0f2ee0c100 (Fopen_network_stream): Set immediate_quit for the connect. 1996-02-26 00:07:45 +00:00
Karl Heuer
6ed6233b68 (wait_reading_process_input):
Pass new arg to swallow_events.

(wait_reading_process_input): If read_kbd is 1,
use detect_input_pending_run_timers instead of detect_input_pending.
1996-02-21 21:08:31 +00:00
Erik Naggum
ada9a4fdf9 (Faccept_process_output): Accept sub-second timeouts. 1996-02-21 01:45:21 +00:00
Richard M. Stallman
8777fbe2bb (Fopen_network_stream): Use sizeof, not strlen, for numeric_addr. 1996-02-11 19:26:25 +00:00
Richard M. Stallman
81c63241a9 (remove_process): Don't unlink the process marker. 1996-02-08 04:19:31 +00:00
Karl Heuer
7968cc2d4b (sigchld_handler): Use cleaner end-of-list test. 1996-02-05 20:32:20 +00:00
Richard M. Stallman
c0239a0b8b (wait_reading_process_input): If select times out,
return only if we had no timers to shorten the wait.
Don't shorten the wait for timers if time_limit is -1.
1996-02-01 20:35:59 +00:00
Richard M. Stallman
038328930d (create_process): Set outchannel to be non-blocking. 1996-01-29 04:52:15 +00:00
Richard M. Stallman
fb4c362712 (wait_reading_process_input): Call timer_check
and shorten the inner delay if appropriate.
1996-01-29 04:50:16 +00:00
Karl Heuer
8db121c493 (wait_reading_process_input) [not subprocesses]: Do
not assume SELECT_TYPE is an int.
1996-01-24 21:21:07 +00:00
Erik Naggum
3b7ad313e0 Update FSF's address in the preamble. 1996-01-15 09:18:04 +00:00
Karl Heuer
4a127b3b17 (create_process): Restore the signal state
after vfork whether it succeeds or not.
1996-01-09 23:40:33 +00:00
Erik Naggum
4ee3e30977 (Fprocessp, Fget_buffer_process, Fdelete_process, Fprocess_status,
Fprocess_exit_status, Fprocess_id, Fprocess_name, Fprocess_command,
Fprocess_tty_name, Fset_process_buffer, Fprocess_buffer, Fprocess_mark,
Fset_process_filter, Fprocess_filter, Fset_process_sentinel,
Fprocess_sentinel, Fset_process_window_size, Fprocess_kill_without_query,
Faccept_process_output): Harmonize arguments with documentation.
1996-01-09 00:33:39 +00:00
Karl Heuer
8e6208c5d2 Comment fixes. 1996-01-05 10:03:17 +00:00
Karl Heuer
798b64bbf6 (Fopen_network_stream): Call bind_polling_period earlier. 1995-12-21 17:13:25 +00:00
Karl Heuer
0dc70c33a0 (create_process): Use Posix signal handling to
block signals, if available.  If HAVE_VFORK, save and restore
signal handlers that the child might change, since in many
systems (e.g. Solaris 2.4) if the child changes the signal
handlers this munges the parent's handler.
1995-12-13 01:52:07 +00:00
Geoff Voelker
583dcae42e [HAVE_NTGUI] (POLL_FOR_INPUT): Define macro.
Use HAVE_WINDOW_SYSTEM instead of testing for specific window systems.
1995-11-07 07:23:14 +00:00
Richard M. Stallman
927e08bef8 (exec_sentinel, read_process_output):
Call record_asynch_buffer_change only if caller is reading kbd input.
1995-10-09 00:31:24 +00:00
Richard M. Stallman
7973cfa85e (read_process_output, exec_sentinel): Call
record_asynch_buffer_change after any eval.  Don't call
prepare_menu_bars.
(wait_reading_process_input): Don't call prepare_menu_bars.
1995-08-08 21:22:16 +00:00
Richard M. Stallman
f2cfa9a63e Maybe include net/errno.h. 1995-08-02 18:31:46 +00:00
Richard M. Stallman
f8a8749802 (Fstart_process): Don't expand the file name before trying openp. 1995-07-25 01:42:05 +00:00
Karl Heuer
ee8e09af76 (keyboard_bit_set): Fix one-off in loop end. 1995-07-17 22:21:21 +00:00
Richard M. Stallman
13373f4ece (Fstart_process): Expand PROGRAM.
Error if it is a directory.
1995-07-07 13:34:16 +00:00
Richard M. Stallman
4590788aa9 (Fopen_network_stream): Sleep 1 sec before connect retry. 1995-06-25 18:57:25 +00:00
Richard M. Stallman
5fc0154cf4 (sigchld_handler): Change XSETFASTINT to XSETINT. 1995-06-19 23:18:54 +00:00
Richard M. Stallman
306230858e (status_notify): Undo May 18 change.
Set update_tick at the beginning not at end.
1995-06-14 14:10:27 +00:00
Karl Heuer
81afb6d1eb [!subprocesses]: Include sysselect.h. 1995-06-08 19:21:05 +00:00
Karl Heuer
ecd1f654a1 (create_process, send_process): Add volatile qualifiers.
(wait_reading_process_input) [both versions]: Cast args of select.
1995-05-26 03:21:30 +00:00
Karl Heuer
bf351cc2be (status_notify): If Vprocess_alist changes within
the loop, do the whole loop again.
1995-05-18 16:54:42 +00:00
Richard M. Stallman
7efe788e31 (wait_reading_process_input): Pass arg in new call to set_waiting_for_input. 1995-05-07 22:23:26 +00:00
Richard M. Stallman
7286affd2a (wait_reading_process_input): Don't call prepare_menu_bars.
Clear waiting_for_input around calling redisplay_preserve_echo_area.
1995-05-06 23:07:51 +00:00
Richard M. Stallman
3162bafa9e (list_processes_1): Cast XFASTINT for passing to sprintf. 1995-05-05 02:16:54 +00:00
Karl Heuer
875e6b94f1 (create_process): Don't reference pty_name if !HAVE_PTYS. 1995-04-28 01:43:02 +00:00
Richard M. Stallman
4aa54ba872 (create_process): Don't abort if can't reopen
pty_name in the child.  Exit the child instead.
1995-04-24 05:52:11 +00:00
Roland McGrath
e01186a181 (create_process): Set PROCESS's tty_name to Qnil when !PTY_FLAG,
so Fprocess_tty_name returns nil for pipes as its docstring says.
1995-04-11 22:46:18 +00:00
Richard M. Stallman
833ba34267 (read_process_output_error_handler)
(exec_sentinel_error_handler): Fsleep_for wants two args.
1995-04-07 22:41:58 +00:00
Karl Heuer
f8c25f1b67 Update copyright. 1995-04-07 02:21:52 +00:00
Karl Heuer
9fa195a2cc (Fsignal_process): SIGCODE is a symbol, not a string. 1995-03-28 23:33:32 +00:00
Richard M. Stallman
4766242da2 (Fsignal_process): Allow signal names as well as numbers. 1995-03-28 17:34:52 +00:00
Richard M. Stallman
dfc21838c0 (exec_sentinel, read_process_output): If running filter
or sentinel changes the local map, call record_asynch_buffer_change.
1995-03-03 10:31:49 +00:00
Richard M. Stallman
7af71e17c1 (Fstart_process): Make process marker point into proc buf. 1995-02-14 14:23:49 +00:00
Karl Heuer
17d02632dd (process_tick, update_tick): Make non-static. 1995-01-25 02:02:37 +00:00
Karl Heuer
5886acf9ae #include sysselect.h instead of defining things by hand. 1995-01-23 23:10:11 +00:00
Francesco Potortì
7074fde664 Added code for automatically saving and restoring the match data
when a filter or sentinel tries to modify it.
1994-11-21 12:50:27 +00:00
Karl Heuer
23d6bb9cd8 (make_process): Use allocate_vectorlike and VECSIZE. 1994-11-16 05:03:02 +00:00
Karl Heuer
b5b502d667 (NETCONN_P, kill_buffer_processes): Use the new type-test macros. 1994-11-15 23:55:26 +00:00
Richard M. Stallman
3ea1d2918f (create_process) [OSF1]: Use setpgid, not setpgrp. 1994-11-10 08:12:48 +00:00
Richard M. Stallman
e98d950b32 Use macros IS_ANY_SEP, IS_DIRECTORY_SEP,
IS_DEVICE_SEP, DIRECTORY_SEP, and DEVICE_SEP.
[WINDOWSNT]: Add includes.  Don't define sys_siglist.

(sigchld_handler): Work around bug in MS C compiler.
(sigchld_handler) [WINDOWSNT]: Do not call signal.
(signal_process) [WINDOWSNT]: Use win32_kill_process instead of kill.
(read_process_output) [WINDOWSNT]: Use read_child_output instead of
read.

(create_process) [WINDOWSNT]: Use
pipe_with_inherited_out  and pipe_with_inherited_in.
Use the pid returned by child_setup.  Deal with not having vfork,
Call register_child.
(close_process_descs): Do nothing if WINDOWSNT.

(proc_buffer_char): No longer static.
1994-11-01 08:31:31 +00:00
Richard M. Stallman
ed0cae0592 (status_message): Add a cast.
(sigchld_handler): Add a cast.
1994-10-26 09:30:46 +00:00
Karl Heuer
a9fde32e8d (list_processes_1): Print tty name. 1994-10-26 00:21:05 +00:00
Richard M. Stallman
a69281ffda 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.
1994-10-25 09:48:44 +00:00
Karl Heuer
7c6f34f0cc (read_process_output): Don't use XFASTINT as an lvalue. 1994-10-04 17:35:21 +00:00
Karl Heuer
22719df2b3 (make_process, list_processes_1, create_process, Faccept_process_output,
wait_reading_process_input, read_process_output, send_process,
sigchld_handler): Don't use XFASTINT as an lvalue.
1994-10-04 16:10:39 +00:00
Karl Heuer
1d056e645c (make_process, create_process, Fopen_network_stream, deactivate_process,
Faccept_process_output, Fprocess_send_eof): Use new accessor macros instead of
calling XSET directly.
1994-10-04 12:21:04 +00:00
Karl Heuer
bcd69aea93 (decode_status, Fprocessp, Fget_process, Fget_buffer_process, Fprocess_status,
Fprocess_exit_status, list_processes_1, Fstart_process, Fopen_network_stream,
Faccept_process_output, wait_reading_process_input, sigchld_handler,
status_notify): Use type test macros.
1994-09-27 01:53:42 +00:00
Richard M. Stallman
16d71e8b20 (Fprocess_send_eof): Delete DID_REMOTE conditional. 1994-09-24 00:15:23 +00:00
Richard M. Stallman
3b9a3dfaee (exec_sentinel_error_handler): New function.
(exec_sentinel): Catch all errors in the sentinel.
(read_process_output_error_handler): New function.
(read_process_output_call): New function.
(read_process_output): Catch and report errors in filters.

(pty_name): Move it up; make it static.
(create_process): Set the tty_name field.
(Fprocess_tty_name): New function.
(syms_of_process): defsubr it.
1994-09-23 22:28:08 +00:00
Richard M. Stallman
d430ee71cc (wait_reading_process_input):
Clear waiting_for_user_input_p before returning.
1994-08-19 07:23:05 +00:00
Richard M. Stallman
5e7e1da2fe (create_process): Set default handling for SIGINT, etc.
(wait_reading_process_input): Fix previous change.
1994-07-31 00:00:24 +00:00
Richard M. Stallman
e86bf40805 (wait_reading_process_input): If wait_for_cell,
do check for keyboard input and handle it.
1994-07-27 00:12:59 +00:00
Richard M. Stallman
5f0929a7f9 [!HAVE_H_ERRNO]: Declare h_errno.
(Fopen_network_stream): Set h_errno to 0 initially.
1994-07-25 20:47:57 +00:00
Richard M. Stallman
616da37c08 (Fopen_network_stream): Retry gethostbyname after TRY_AGAIN failure. 1994-07-19 19:35:43 +00:00
Richard M. Stallman
6545aadab7 (Qlast_nonmenu_event): New variable.
(syms_of_process): Set it up.
(read_process_output, exec_sentinel): Bind it to t around filter.
1994-07-13 03:52:05 +00:00
Richard M. Stallman
4556b700ea (send_process): Major rewrite.
Don't put in a C-d unless a single line is too long.
Read process input whenever output gets stuck.
Relocate BUF if we read input.  New arg OBJECT.
Fprocess_send_region, Fprocess_send_string, process_send_signal)
(Fprocess_send_eof): Pass new arg OBJECT.
1994-06-25 22:35:28 +00:00
Richard M. Stallman
343f4114c3 (Fprocess_status): Return nil for process name that has no process. 1994-06-17 13:40:33 +00:00
Karl Heuer
3081bf8d25 (create_process): Set input_wait_mask before forking. 1994-06-15 00:24:54 +00:00
Richard M. Stallman
d33a00f212 (Fprocess_send_eof): Doc fix. 1994-06-14 19:46:00 +00:00
Richard M. Stallman
e1ab4959f3 (kill_buffer_processes): For net conn, use Fdelete_process. 1994-06-01 20:36:08 +00:00
Richard M. Stallman
fe45da4e02 (create_process): Get a pty for any non-nil Vprocess_connection_type value. 1994-05-30 10:19:16 +00:00
Richard M. Stallman
4458f5554d (create_process): Don't complain about error from TIOCSETD. 1994-05-21 07:28:57 +00:00
Richard M. Stallman
44ade2e949 (Fopen_network_stream): Call bind_polling_period; later unbind the binding.
(POLL_FOR_INPUT): Define, if appropriate.
1994-05-13 08:31:05 +00:00
Karl Heuer
8fb3cf6481 (exec_sentinel): Don't deactivate the mark. Check for asynch buffer switch. 1994-05-11 04:04:03 +00:00
Richard M. Stallman
d0adf46f86 (process_send_signal): If PREFER_VSUSP, use VSUSP instead of VSWTCH. 1994-05-09 03:30:55 +00:00
Richard M. Stallman
8b4d685f01 (wait_reading_process_input): Don't call prepare_menu_bars
unless we are going to redisplay for a garbaged frame.
(read_process_output): Call prepare_menu_bars if waiting for input.
(exec_sentinel): Call prepare_menu_bars if waiting for input.
1994-05-06 06:39:48 +00:00
Richard M. Stallman
7ce486180b (create_process): Undo April 19 setsid change. 1994-05-02 04:07:06 +00:00
Paul Reilly
cf32fea0cd (IN_ADDR, NUMERIC_ADDR_ERROR): Made conditional on HAVE_BROKEN_INET_ADDR. 1994-04-30 23:28:10 +00:00
Richard M. Stallman
e333e8646b (Fopen_network_stream): Retry the connect if EADDRINUSE. Ignore EISCONN. 1994-04-30 06:05:51 +00:00
Richard M. Stallman
6311cf580d (create_process): If vfork fails, close forkin and forkout. 1994-04-28 04:35:39 +00:00
Karl Heuer
9bcf8ec6d3 (create_process) [HAVE_TERMIOS && LDISC1]: Use tcsetattr. 1994-04-26 21:17:19 +00:00
Richard M. Stallman
ab01d0a826 (create_process): Use child_setup_tty only if pty_flag. 1994-04-24 03:10:24 +00:00
Richard M. Stallman
13a72104de (create_process): Use SETUP_SLAVE_PTY only if pty_flag. 1994-04-24 03:06:55 +00:00
Richard M. Stallman
7d0e672ed4 (max_process_desc): New variable.
(wait_reading_process_output): Don't look for process output
beyond that many bits.
(create_process, Fopen_network_stream, deactivate_process): Update it.
(init_process): Initialize it.
1994-04-23 05:18:09 +00:00
Richard M. Stallman
51632cc823 (send_process): If fpathconf fails, use 250. 1994-04-21 19:54:28 +00:00
Richard M. Stallman
39e9ebcd7f (create_process): Call setsid only if pty_flag. 1994-04-20 03:49:47 +00:00
Richard M. Stallman
aafadd9f17 (create_process): Fix previous change. 1994-04-18 17:40:25 +00:00
Richard M. Stallman
5029e0e016 (create_process): Test TIOCSETD along with NTTYDISC. 1994-04-16 07:26:19 +00:00
Richard M. Stallman
396df3227d (Fset_process_window_size): New function. 1994-04-12 15:11:58 +00:00
Richard M. Stallman
1cac1fffd2 (send_process): Test pty_flag field for nil, not 0. 1994-04-12 04:39:34 +00:00
Karl Heuer
d72534bad1 (read_process_output): If buffer changes, record that fact. 1994-04-08 05:58:12 +00:00
Karl Heuer
e6194ffc49 Fix typos in comments. 1994-03-29 04:57:16 +00:00
Karl Heuer
2e4149a838 (status_notify): Use assignment, not initialization. 1994-03-25 00:40:16 +00:00
Richard M. Stallman
5164ee8e40 (wait_reading_process_input, both versions): Don't call
redisplay_preserve_echo_area unless do_display.
1994-03-20 01:16:55 +00:00
Karl Heuer
ff773a4e16 (create_process): Skip the ioctl if fd is -1. 1994-03-18 00:23:47 +00:00
Karl Heuer
3b639868ce (Fstart_process): GCPRO some things. 1994-03-18 00:12:41 +00:00
Karl Heuer
51ab806af8 (Fget_buffer_process): Fix typo in comment. 1994-03-14 21:48:09 +00:00
Karl Heuer
1619761daf (get_process): Allow arg to be a buffer object. 1994-03-12 03:13:20 +00:00
Roland McGrath
5d69474126 (send_process) [_PC_MAX_CANON]: Also test #ifdef HAVE_FPATHCONF before
trying to use fpathconf.
1994-03-08 06:53:48 +00:00
Richard M. Stallman
41f3aa98d1 (chan_process, Vprocess_alist): No longer static. 1994-03-02 23:35:11 +00:00
Richard M. Stallman
93b4f69974 Include unistd.h.
(pty_max_bytes): New variable.
(send_process): Send an eof after each pty_max_bytes bytes.
1994-03-02 22:50:31 +00:00
Roland McGrath
a86928f70c (sys_siglist): Protect decl with #ifndef SYS_SIGLIST_DECLARED. 1994-02-11 02:52:17 +00:00
Richard M. Stallman
f2d2dbfe1c (Fprocess_kill_without_query): Doc fix. 1994-02-08 07:26:28 +00:00
Richard M. Stallman
b97ad9eabe (sigchld_handler, status_message): Handle a NULL in sys_siglist. 1994-01-14 14:17:12 +00:00
Richard M. Stallman
2ea6d56151 (read_process_output): Supply second arg to unbind_to.
(exec_sentinel): Likewise.
1994-01-11 05:49:41 +00:00
Richard M. Stallman
afc549fd99 (create_process): Set line discipline only if pty_flag. 1994-01-10 18:13:39 +00:00
Roland McGrath
b062d1fe44 Don't declare sys_nerr.
Don't declare sys_errlist unless #ifdef VMS.
Declare strerror instead.
(wait_reading_process_input): Call strerror instead of using sys_errlist.
1994-01-09 23:06:40 +00:00
Richard M. Stallman
a0e4d3f399 Comment changes. 1994-01-09 12:16:26 +00:00
Richard M. Stallman
53aad33f8a (read_process_output): Use clip_to_bounds when moving
to the process marker.
1994-01-01 15:12:52 +00:00
Richard M. Stallman
000ab717b0 (create_process) [NTTYDISC]: Set the tty line discipline. 1993-12-25 01:44:47 +00:00
Richard M. Stallman
457a9beede (Fopen_network_stream): Turn off SIGIO while connecting. 1993-12-24 03:49:30 +00:00
Richard M. Stallman
99e3d726dc (Fprocess_status): Use get_process, not Fget_process.
[BROKEN_O_NONBLOCK]: Undefine O_NONBLOCK.

(create_process): Delete SYSV4_PTYS code.
(deactivate_process): Likewise.

(create_process) [SET_CHILD_PTY_PGRP]: Do ioctls
to set the pgrp of the pty.

(wait_reading_process_input): Call prepare_menu_bars.
1993-12-23 01:24:18 +00:00
Richard M. Stallman
53b6ab286b (deactivate_process) [SVR4_PTYS]: If subtty is not nil, close it. 1993-12-23 01:22:23 +00:00
Richard M. Stallman
c14e53a442 (create_process): Do setpgrp for USG regardless of IRIX.
(process_send_signal) [IRIX5]: For SIGTSTP, use VSUSP, not VSWTCH.
1993-11-25 21:36:51 +00:00
Richard M. Stallman
6c955bcb52 (Fdelete_process): Fix paren error. 1993-11-24 22:42:25 +00:00
Richard M. Stallman
a9f2c8845b (wait_reading_process_input):
Use -1 to mean wait_channel is empty.
Start process loop with descriptor 0 if keyboard_descriptor is not 0.
(make_process): Initialize descriptors to -1.
(Fdelete_process): -1 means empty, in infd.
(deactivate_process): Likewise.
(process_send_signal): Likewise.
(kill_buffer_processes): Likewise.
(sigchld_handler): Likewise.
(status_notify): Likewise.
(close_process_descs): Likewise.
(create_process): Likewise.
(Fopen_network_stream): Likewise.
(send_process): Likewise.
(Fprocess_send_eof): Likewise.  Use XINT when closing outfd.
(Fset_process_filter): Use XINT to get infd value.
(wait_reading_process_input): Likewise.

(wait_reading_process_input): When bypassing select, clear Available.
1993-11-23 10:57:16 +00:00
Richard M. Stallman
79967d5e93 (IN_ADDR, NUMERIC_ADDR_ERROR): New macros (two versions).
(Fopen_network_stream): Use them.
1993-11-13 09:31:34 +00:00
Richard M. Stallman
77b221b15d (get_process): Add `static' to definition. 1993-11-13 02:37:58 +00:00
Richard M. Stallman
1d2c16fa6d [TERM]: Include client.h.
(Fopen_network_stream): Handle TERM.
1993-11-04 22:13:15 +00:00
Brian Fox
393a96790d (Fopen_netwrok_stream): Cast arg to inet_addr to (char *). 1993-10-25 05:13:17 +00:00
Richard M. Stallman
20ddfff719 (status_notify): Don't read from process if filter is t.
(Fset_process_filter): Set or clear bit in input_wait_mask when nec.
1993-10-22 01:16:04 +00:00
Roland McGrath
18160b98ce Include <config.h> instead of "config.h". 1993-09-10 06:15:46 +00:00
Richard M. Stallman
dd2281ae2a (keyboard_descriptor): New variable.
(wait_reading_process_input, init_keyboard): Use it.
Also call change_input_fd.
(change_keyboard_wait_descriptor): New function.
1993-09-08 17:53:11 +00:00
Richard M. Stallman
889255b458 Include syswait.h.
(wait_reading_process_input): Exit without waiting
if wait_for_cell is already non-nil.
1993-08-15 03:52:43 +00:00
Richard M. Stallman
6cbc22ed96 (wait_reading_process_input): Undo last two changes:
when wait_for_cell, do not check the keyboard.
1993-07-28 08:19:30 +00:00
Richard M. Stallman
eb4686e4a3 (Fprocess_status): Use Fget_process, to avoid error
if unknown process name.
1993-07-24 05:47:16 +00:00
Richard M. Stallman
312c996467 (Fget_buffer_process): Delete doc string from
second alternative definition.
1993-07-22 19:38:51 +00:00
Richard M. Stallman
97f3b3d6e9 (wait_reading_process_input): If wait_for_cell, do call
swallow_events and do_pending_window_change when appropriate.
1993-07-09 21:42:51 +00:00
Richard M. Stallman
de6fd4b97c (wait_reading_process_input): Do include the keyboard
in the select, if read_kbd was a cons cell.
1993-07-02 05:43:43 +00:00
Richard M. Stallman
7324d660df (wait_reading_process_input): Use SIGIO only if defined. 1993-06-29 16:53:32 +00:00
Jim Blandy
5a570e3721 Changes for Irix 4.0, tested this time:
* s/irix4-0.h: Get rid of our fake definitions for setpgrp and
	getpgrp.
	* callproc.c (Fcall_process): Go ahead and use the USG calling
	convention for setpgrp.
	* ymakefile (pre-crt0.o): Add rule for this.  Perhaps it will help
	separate-source-directory compilation.
	* emacs.c (shut_down_emacs): Some USG systems #define
	EMACS_HAVE_TTY_PGRP; call getpgrp as appropriate for such systems.
	* sysdep.c (sys_suspend): Call getpgrp as appropriate for USG and
	non-USG.
	* process.c [IRIX] (create_process): Don't put child in process
	group zero before opening the tty; Irix is like USG in this
	regard.
1993-06-18 23:33:20 +00:00
Jim Blandy
b5aaed99d0 * callproc.c (Fcall_process, child_setup): If IRIX is #defined,
call setpgrp with arguments, even if USG is #defined.
	* process.c [IRIX] (create_process): Don't call setpgrp before
	opening the pty.  Call it after doing the TIOCNOTTY ioctl.
1993-06-17 22:03:06 +00:00
Richard M. Stallman
188d6c4e63 (start_process_unwind): Use XINT. 1993-06-12 16:58:31 +00:00
Richard M. Stallman
592ce97fa8 (read_process_output): Don't deactivate the mark.
Do restore Vdeactivate_mark, so that no one else deactivates it.
1993-06-11 21:06:14 +00:00
Jim Blandy
91d10fa88d Typo. 1993-06-10 09:32:18 +00:00
Jim Blandy
6382623783 * process.c (sigchld_handler): Add cast, to avoid warnings on Linux.
(Fopen_network_stream): Cast the second argument to connect, to
	avoid warnings on any system that provides prototypes for connect.
1993-06-09 12:39:16 +00:00
Jim Blandy
95e8068d3e * process.c (sigchld_handler): Add cast, to avoid warnings on Linux. 1993-06-09 12:30:13 +00:00
Jim Blandy
eb8c3be94e Apply typo patches from Paul Eggert. 1993-06-09 11:59:12 +00:00
Richard M. Stallman
30c7817593 (read_process_output): Deactivate the mark.
Save and restore Vdeactivate_mark.
1993-06-06 03:15:59 +00:00
Richard M. Stallman
334c4f2ffd (MAXDESC): Get it from FD_SETSIZE if that exists. 1993-05-29 05:02:18 +00:00
Richard M. Stallman
6e103bac2a (wait_reading_process_input): Call swallow_events. 1993-05-25 23:19:07 +00:00
Richard M. Stallman
084fd64ac9 (create_process): Ignore retval from TIOCSTTY.
(sys_siglist) [LINUX]: Don't even declare it.
1993-05-24 17:13:24 +00:00
Jim Blandy
c6c5df7f76 Updated copyright years. 1993-05-22 21:34:42 +00:00
Jim Blandy
39a21be6fc * process.c (Fopen_network_stream): Deal with older systems, which
only have the h_addr field in their struct hostent.
1993-05-22 00:12:17 +00:00
Jim Blandy
161aa2f8d8 Some more changes from Michael K. Johnson for Linux.
* s/template.h: Mention that you should #define HAVE_TERMIO or
	HAVE_TERMIOS, but not both, and that HAVE_TERMIOS is preferred.
	* systty.h (EMACS_SET_TTY_PGRP): Don't assign the return value of
	tcsetpgrp to *pgid; it's just a status value.
	* config.h.in (HAVE_RANDOM): This shouldn't be defined on Linux
	systems using XFree386, and perhaps is inappropriate in general.
	* m/intel386.h: #undefine the integer size macros, since the Linux
	<values.h> file #defines them itself.
	* mem-limits.h (get_lim_data): Linux has the ulimit call; if it
	fails, fall back on ULIMIT_BREAK_VALUE.
	* process.c: Linux needs the WAITTYPE, etc. definitions.
	* unexec.c (hdr, ohdr): Linux has the ordinary `struct exec' type;
	no need to use SYSV names.
	* s/linux.h: New file.
1993-05-20 02:14:56 +00:00
Jim Blandy
90ab1a81b9 * process.c (wait_reading_process_input): Undo change of April
29th, since that re-introduces the race condition the comments are
	warning about.  Call clear_waiting_for_input before calling
	status_notify, though.
1993-05-19 05:41:37 +00:00
Jim Blandy
9aa2a7f43e * process.c (wait_reading_process_input): Don't forget to call
clear_waiting_for_input when we exit the loop because process
	input has arrived.
1993-05-19 05:05:46 +00:00
Jim Blandy
fad97cbed6 * process.c [__sgi] (allocate_pty): Give up immediately if pty is
inaccessible.
1993-05-19 04:38:28 +00:00
Jim Blandy
e01091534d Document sun change. 1993-05-16 18:12:57 +00:00
Jim Blandy
26ec91de25 * process.c (wait_reading_process_input): If we're running
Solaris, it's not necessary to check if we should redeliver SIGIO,
	according to David Mackenzie.
	* s/sol2.h: #include "usg5-4.h", and #define const.
1993-05-15 23:20:33 +00:00
Richard M. Stallman
68a752206e (wait_reading_process_input): Move the status_notify
call before the set_waiting_for_input call.
1993-04-29 15:57:17 +00:00
Jim Blandy
5437e9f97e New macros NULL_DEVICE and EXEC_SUFFIXES, to give the name of the
equivalent of /dev/null, and the suffixes used by executable
	files.  This is simple, and helps people porting Emacs to other
	operating systems.
	* process.h (NULL_DEVICE): Give this a default value.
	* process.c (Fstart_process): Pass EXEC_SUFFIXES to openp.
	(Fprocess_send_eof): Use NULL_DEVICE instead of "/dev/null".
	* callproc.c (Fcall_process): Pass EXEC_SUFFIXES to openp.
	Use NULL_DEVICE instead of "/dev/null".
1993-03-30 23:05:56 +00:00
Jim Blandy
f298026408 Rename int-to-string to number-to-string, since it can handle
floating-point as well as integer arguments.  subr.el defines the
	former as an alias for the latter.
	* data.c (Fnumber_to_string): Renamed from Fint_to_string.
	(wrong_type_argument): Adjust caller.
	(syms_of_data): Adjust defsubr.
	* fns.c (concat): Adjust caller.
	* lisp.h (Fnumber_to_string): Adjust extern declaration.
	* mocklisp.c (Finsert_string): Adjust caller.
	* process.c (status_message): Adjust caller.
1993-03-30 21:21:49 +00:00
Jim Blandy
c6c6865d43 * process.c [VMS] (DCL_PROMPT): Remove hack.
(WIFSTOPPED, WIFSIGNALED, WIFEXITED, XRETCODE, WSTOPSIG,
	WCOREDUMP, WTERMSIG): New dummy definitions.
	(deactivate_process): Add missing semicolon.
1993-03-25 02:27:16 +00:00
Jim Blandy
6e4f3667d9 * process.c (wait_reading_process_input): Doc fix. 1993-03-20 22:58:54 +00:00
Richard M. Stallman
dcf970e66f Fix typo in previous change. 1993-03-17 09:19:47 +00:00
Richard M. Stallman
577d03d57f (Fprocess_send_eof): Make sure proc is running. 1993-03-17 07:59:09 +00:00
Richard M. Stallman
84aa3ace66 (wait_reading_process_input): New option to wait
till a given cons cell has a non-nil car.
Delete vipc conditionals.
1993-03-15 06:09:04 +00:00
Jim Blandy
a87b802fe9 * process.c (process_send_signal): In the TERMIOS code for sending
control characters to processes, don't try to return Qnil; just
	return.

	* process.c [! subprocesses] (wait_reading_process_input):
	Remember to re-enable polling for input.
1993-03-11 07:14:16 +00:00
Jim Blandy
6be429b169 * process.c: Make sure we don't miss processes exiting, by having
the sigchld handler clear *input_available_clear_time.
	(wait_reading_process_input): Check for process activity after
	setting the timeout and calling set_waiting_for_input.
	(sigchld_handler): If the process which has exited is one we care
	about, clear *input_available_clear_time.

	* process.c (process_send_signal): Use TERMIOS functions in
	preference to BSD ioctls.  Some systems attempt to provide the BSD
	functions for backward compatibility, and get it wrong.
1993-02-22 14:47:53 +00:00
Michael I. Bushnell
82df4891d0 * process.c (Fstart_process): Jimb's change of December 11
had a misplaced paren.  This only became apparent because of
	jimb's change on February 8 to Fexpand_file_name.
	* callproc.c (Fcall_process): Ditto.
1993-02-18 03:43:45 +00:00
Jim Blandy
1dc77cc346 * frame.h (FRAME_SAMPLE_VISIBILITY): Make sure frame is marked as
garbaged whenever it goes from invisible to visible.
	* dispextern.h (frame_garbaged): Move extern declaration from here...
	* frame.h (frame_garbaged): ... to here.  The FRAME_SAMPLE_VISIBILITY
	macro uses it now, and this seems to be just as modular.  Make a
	new page, just for this and message_buf_print.
	(struct frame): Doc fix for the `visible' field.
	* process.c: #include "frame.h" instead of "dispextern.h"; the
	only thing we care about from it is the frame_garbaged
	declaration.
	* ymakefile: Note dependency change.
1993-01-14 15:13:19 +00:00
Jim Blandy
1e30af705a Give subprocess creation a way to find a valid current directory
for subprocesses when the buffer's default-directory is a handled
	name.
	* fileio.c (Funhandled_file_name_directory): New function.
	(Qunhandled_file_name_directory): New file-name-handler operation.
	(syms_of_fileio): Defsubr Sunhandled_file_name_directory, and
	initialize and staticpro Qunhandled_file_name_directory.
	* callproc.c (Fcall_process): Call Funhandled_file_name_directory
	on the buffer's default directory.  Do it earlier in the function
	so there's less to GCPRO.
	* process.c (create_process): Don't check the validity of the
	buffer's default directory here...
	(Fstart_process): Instead, do it here; if we call
	Funhandled_file_name_directory here, there's less GCPROing to do.
1992-12-12 15:36:50 +00:00
Jim Blandy
016899c07c Tue Dec 1 23:42:25 1992 Jim Blandy (jimb@totoro.cs.oberlin.edu)
* process.c (wait_reading_process_input): Doc fix.
1992-12-06 22:19:47 +00:00
Jim Blandy
b0310da46a * systty.h, process.c, buffer.h, callproc.c, sysdep.c, dired.c:
Added VMS changes from Roland Roberts.

	* process.c (read_process_output): Save, widen, insert the process
	output, and then restore the restriction if inserting text outside
	the visible region.

	* process.c (Fstart_process): Establish an unwind-protect to
	remove PROC from the process list if an error occurs while
	starting it.
	(start_process_unwind): New function to help with that.
	(create_process): There's no need to explicitly call
	remove_process if the fork fails; the record_unwind_protect in
	Fstart_process will take care of it.

	* process.c (wait_reading_process_input): Test the C preprocessor
	symbol "ultrix", not "__ultrix__" to see if we should ignore
	ENOMEM errors from select.

	* process.c (process_send_signal): On systems which have both
	the TIOCGETC and TCGETA ioctls, just use the former.

	* s/bsd4-2.h, s/bsd4-3.h: #define SIGNALS_VIA_CHARACTERS.
	* process.c (process_send_signal): Put all the code for sending
	signals via characters in a #ifdef SIGNALS_VIA_CHARACTERS.  Decide
	whether to use the Berkeley-style or SYSV-style ioctls by seeing
	which ioctl commands are #defined.

	* process.c (process_send_signal): Doc fix.
1992-11-16 00:53:26 +00:00
Jim Blandy
7d79e3b431 * process.c [SYSV]: Don't include <termios.h>, <termio.h>, or
<fcntl.h>.
	(process_send_signal): Don't try to send SIGTSTP
	unless SIGTSTP is defined.
1992-11-07 07:36:10 +00:00
Jim Blandy
f97388409e * process.c: (status_convert): Declare this to return a
Lisp_Object at the top of the file.
	(decode_status): Don't untag XCONS (tem)->cdr before storing it in
	tem; tem is a Lisp_Object, too.
	(process_send_signal): Declare this to be static void.  Don't
	return Qnil; nobody cares.
	(sigchld_handler): Use XFASTINT to manipulate p->infd.

	* process.c (pty_process): Variable deleted; it's no longer used.
	(syms_of_process): Don't initialize it.
1992-10-31 05:27:42 +00:00
Jim Blandy
8058415c7a * process.c (wait_reading_process_input): If the select returns
ENOMEM, treat that like EINTR under Ultrix.
1992-10-03 03:30:53 +00:00
Jim Blandy
63528b78dd * process.c [SIGCHLD && !BSD && !UNIPLUS && !HPUX]
(create_process): #if 0 out the code which sets the child's
	handler for SIGCHLD to sigchld; the code which gives sigchld its
	value has been diked out under these CPP symbols, so this should
	be diked out too.
1992-09-23 11:51:59 +00:00
Richard M. Stallman
de946e5aac (Faccept_process_output): Initialize useconds. 1992-09-20 21:06:42 +00:00
Jim Blandy
36ebaafa99 * process.c: Include "systty.h", not "systerm.h". 1992-08-29 03:05:43 +00:00
Richard M. Stallman
ce4c9c9080 (WCOREDUMP): Define only if not defined.
(create_process) [HAVE_SETSID]: Use TIOCSCTTY if exists.
1992-08-22 02:53:24 +00:00
Jim Blandy
0ad77c5462 * process.c (process_send_signal): Don't send SIGTSTP if the
system doesn't have that facility.

	* process.c: [USG5] Don't include <fcntl.h>.
	[USG] Don't bother including termios, termio, or fcntl; systerm.h
	takes care of all that.
	Remove the "mis;tak-+;;" line from the code; apparently this
	section of code does get used.

	* process.c (wait_reading_process_input): Put comments around
	text following #endif.
1992-08-19 06:35:23 +00:00
Jim Blandy
301c3fe461 entered into RCS 1992-07-22 18:20:35 +00:00
Richard M. Stallman
4d7c105e5d *** empty log message *** 1992-07-19 17:48:44 +00:00
Jim Blandy
ebb9e16f98 *** empty log message *** 1992-07-16 22:56:42 +00:00
Jim Blandy
ff11dfa15b *** empty log message *** 1992-07-13 20:53:59 +00:00
Joseph Arceneaux
508b171c56 *** empty log message *** 1992-06-05 18:39:41 +00:00
Jim Blandy
f76475ad8a *** empty log message *** 1992-05-19 05:22:52 +00:00
Jim Blandy
ffd56f97cf *** empty log message *** 1992-05-18 08:14:41 +00:00
Jim Blandy
e065a56e2d *** empty log message *** 1992-05-10 18:15:10 +00:00
Jim Blandy
32676c085c *** empty log message *** 1992-05-01 06:20:46 +00:00
Jim Blandy
4746118aca *** empty log message *** 1992-04-24 08:11:54 +00:00
Jim Blandy
0856496329 *** empty log message *** 1992-04-01 11:14:15 +00:00
Jim Blandy
6720a7fb28 *** empty log message *** 1992-03-18 20:22:31 +00:00
Jim Blandy
d0d6b7c506 Initial revision 1992-03-14 20:40:04 +00:00