aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c43
1 files changed, 26 insertions, 17 deletions
diff --git a/src/process.c b/src/process.c
index 2609a9cc250..cf6d40052a7 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1077,7 +1077,9 @@ is more appropriate for saving the process buffer.
1077 1077
1078Binding the variable `inherit-process-coding-system' to non-nil before 1078Binding the variable `inherit-process-coding-system' to non-nil before
1079starting the process is an alternative way of setting the inherit flag 1079starting the process is an alternative way of setting the inherit flag
1080for the process which will run. */) 1080for the process which will run.
1081
1082This function returns FLAG. */)
1081 (register Lisp_Object process, Lisp_Object flag) 1083 (register Lisp_Object process, Lisp_Object flag)
1082{ 1084{
1083 CHECK_PROCESS (process); 1085 CHECK_PROCESS (process);
@@ -1090,7 +1092,8 @@ DEFUN ("set-process-query-on-exit-flag",
1090 2, 2, 0, 1092 2, 2, 0,
1091 doc: /* Specify if query is needed for PROCESS when Emacs is exited. 1093 doc: /* Specify if query is needed for PROCESS when Emacs is exited.
1092If the second argument FLAG is non-nil, Emacs will query the user before 1094If the second argument FLAG is non-nil, Emacs will query the user before
1093exiting or killing a buffer if PROCESS is running. */) 1095exiting or killing a buffer if PROCESS is running. This function
1096returns FLAG. */)
1094 (register Lisp_Object process, Lisp_Object flag) 1097 (register Lisp_Object process, Lisp_Object flag)
1095{ 1098{
1096 CHECK_PROCESS (process); 1099 CHECK_PROCESS (process);
@@ -2532,7 +2535,7 @@ could be "COM1", or "\\\\.\\COM10" for ports higher than COM9 (double
2532the backslashes in strings). 2535the backslashes in strings).
2533 2536
2534:speed SPEED -- (mandatory) is handled by `serial-process-configure', 2537:speed SPEED -- (mandatory) is handled by `serial-process-configure',
2535which is called by `make-serial-process'. 2538which this function calls.
2536 2539
2537:name NAME -- NAME is the name of the process. If NAME is not given, 2540:name NAME -- NAME is the name of the process. If NAME is not given,
2538the value of PORT is used. 2541the value of PORT is used.
@@ -2561,13 +2564,12 @@ but you can send outgoing data. The stopped state is cleared by
2561 2564
2562:plist PLIST -- Install PLIST as the initial plist of the process. 2565:plist PLIST -- Install PLIST as the initial plist of the process.
2563 2566
2564:speed
2565:bytesize 2567:bytesize
2566:parity 2568:parity
2567:stopbits 2569:stopbits
2568:flowcontrol 2570:flowcontrol
2569-- These arguments are handled by `serial-process-configure', which is 2571-- This function calls `serial-process-configure' to handle these
2570called by `make-serial-process'. 2572arguments.
2571 2573
2572The original argument list, possibly modified by later configuration, 2574The original argument list, possibly modified by later configuration,
2573is available via the function `process-contact'. 2575is available via the function `process-contact'.
@@ -2801,7 +2803,7 @@ The stopped state is cleared by `continue-process' and set by
2801:filter-multibyte BOOL -- If BOOL is non-nil, strings given to the 2803:filter-multibyte BOOL -- If BOOL is non-nil, strings given to the
2802process filter are multibyte, otherwise they are unibyte. 2804process filter are multibyte, otherwise they are unibyte.
2803If this keyword is not specified, the strings are multibyte if 2805If this keyword is not specified, the strings are multibyte if
2804`default-enable-multibyte-characters' is non-nil. 2806the default value of `enable-multibyte-characters' is non-nil.
2805 2807
2806:sentinel SENTINEL -- Install SENTINEL as the process sentinel. 2808:sentinel SENTINEL -- Install SENTINEL as the process sentinel.
2807 2809
@@ -4898,16 +4900,23 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd,
4898 It can't hurt. */ 4900 It can't hurt. */
4899 else if (nread == -1 && errno == EIO) 4901 else if (nread == -1 && errno == EIO)
4900 { 4902 {
4901 /* Don't do anything if only a pty, with no associated 4903 struct Lisp_Process *p = XPROCESS (proc);
4902 process (bug#10933). */ 4904
4903 if (XPROCESS (proc)->pid != -2) { 4905 /* Clear the descriptor now, so we only raise the
4904 /* Clear the descriptor now, so we only raise the signal 4906 signal once. */
4905 once. */ 4907 FD_CLR (channel, &input_wait_mask);
4906 FD_CLR (channel, &input_wait_mask); 4908 FD_CLR (channel, &non_keyboard_wait_mask);
4907 FD_CLR (channel, &non_keyboard_wait_mask); 4909
4908 4910 if (p->pid == -2)
4909 kill (getpid (), SIGCHLD); 4911 {
4910 } 4912 /* If the EIO occurs on a pty, sigchld_handler's
4913 wait3() will not find the process object to
4914 delete. Do it here. */
4915 p->tick = ++process_tick;
4916 p->status = Qfailed;
4917 }
4918 else
4919 kill (getpid (), SIGCHLD);
4911 } 4920 }
4912#endif /* HAVE_PTYS */ 4921#endif /* HAVE_PTYS */
4913 /* If we can detect process termination, don't consider the 4922 /* If we can detect process termination, don't consider the