diff options
| author | Joakim Verona | 2012-05-21 00:37:29 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-05-21 00:37:29 +0200 |
| commit | 74f082445c1dd0c92d5bb187db0d50287e3a7bae (patch) | |
| tree | 48e3d8fd9df3876665654eab9bcf96ec492a31e9 /src/process.c | |
| parent | 52862ad482e030e4d54cd7d6e250d76e59ee0554 (diff) | |
| parent | 1b170bc63c2f3a3fbe6ba6996d5a015e82634909 (diff) | |
| download | emacs-74f082445c1dd0c92d5bb187db0d50287e3a7bae.tar.gz emacs-74f082445c1dd0c92d5bb187db0d50287e3a7bae.zip | |
upstream, fix conflicts
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 50 |
1 files changed, 33 insertions, 17 deletions
diff --git a/src/process.c b/src/process.c index 65020299e75..cf6d40052a7 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -120,6 +120,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 120 | #include "nsterm.h" | 120 | #include "nsterm.h" |
| 121 | #endif | 121 | #endif |
| 122 | 122 | ||
| 123 | /* Work around GCC 4.7.0 bug with strict overflow checking; see | ||
| 124 | <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52904>. | ||
| 125 | These lines can be removed once the GCC bug is fixed. */ | ||
| 126 | #if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ | ||
| 127 | # pragma GCC diagnostic ignored "-Wstrict-overflow" | ||
| 128 | #endif | ||
| 129 | |||
| 123 | Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid; | 130 | Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid; |
| 124 | Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime; | 131 | Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime; |
| 125 | Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs; | 132 | Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs; |
| @@ -1070,7 +1077,9 @@ is more appropriate for saving the process buffer. | |||
| 1070 | 1077 | ||
| 1071 | Binding the variable `inherit-process-coding-system' to non-nil before | 1078 | Binding the variable `inherit-process-coding-system' to non-nil before |
| 1072 | starting the process is an alternative way of setting the inherit flag | 1079 | starting the process is an alternative way of setting the inherit flag |
| 1073 | for the process which will run. */) | 1080 | for the process which will run. |
| 1081 | |||
| 1082 | This function returns FLAG. */) | ||
| 1074 | (register Lisp_Object process, Lisp_Object flag) | 1083 | (register Lisp_Object process, Lisp_Object flag) |
| 1075 | { | 1084 | { |
| 1076 | CHECK_PROCESS (process); | 1085 | CHECK_PROCESS (process); |
| @@ -1083,7 +1092,8 @@ DEFUN ("set-process-query-on-exit-flag", | |||
| 1083 | 2, 2, 0, | 1092 | 2, 2, 0, |
| 1084 | 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. |
| 1085 | If the second argument FLAG is non-nil, Emacs will query the user before | 1094 | If the second argument FLAG is non-nil, Emacs will query the user before |
| 1086 | exiting or killing a buffer if PROCESS is running. */) | 1095 | exiting or killing a buffer if PROCESS is running. This function |
| 1096 | returns FLAG. */) | ||
| 1087 | (register Lisp_Object process, Lisp_Object flag) | 1097 | (register Lisp_Object process, Lisp_Object flag) |
| 1088 | { | 1098 | { |
| 1089 | CHECK_PROCESS (process); | 1099 | CHECK_PROCESS (process); |
| @@ -2525,7 +2535,7 @@ could be "COM1", or "\\\\.\\COM10" for ports higher than COM9 (double | |||
| 2525 | the backslashes in strings). | 2535 | the backslashes in strings). |
| 2526 | 2536 | ||
| 2527 | :speed SPEED -- (mandatory) is handled by `serial-process-configure', | 2537 | :speed SPEED -- (mandatory) is handled by `serial-process-configure', |
| 2528 | which is called by `make-serial-process'. | 2538 | which this function calls. |
| 2529 | 2539 | ||
| 2530 | :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, |
| 2531 | the value of PORT is used. | 2541 | the value of PORT is used. |
| @@ -2554,13 +2564,12 @@ but you can send outgoing data. The stopped state is cleared by | |||
| 2554 | 2564 | ||
| 2555 | :plist PLIST -- Install PLIST as the initial plist of the process. | 2565 | :plist PLIST -- Install PLIST as the initial plist of the process. |
| 2556 | 2566 | ||
| 2557 | :speed | ||
| 2558 | :bytesize | 2567 | :bytesize |
| 2559 | :parity | 2568 | :parity |
| 2560 | :stopbits | 2569 | :stopbits |
| 2561 | :flowcontrol | 2570 | :flowcontrol |
| 2562 | -- These arguments are handled by `serial-process-configure', which is | 2571 | -- This function calls `serial-process-configure' to handle these |
| 2563 | called by `make-serial-process'. | 2572 | arguments. |
| 2564 | 2573 | ||
| 2565 | The original argument list, possibly modified by later configuration, | 2574 | The original argument list, possibly modified by later configuration, |
| 2566 | is available via the function `process-contact'. | 2575 | is available via the function `process-contact'. |
| @@ -2794,7 +2803,7 @@ The stopped state is cleared by `continue-process' and set by | |||
| 2794 | :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 |
| 2795 | process filter are multibyte, otherwise they are unibyte. | 2804 | process filter are multibyte, otherwise they are unibyte. |
| 2796 | If this keyword is not specified, the strings are multibyte if | 2805 | If this keyword is not specified, the strings are multibyte if |
| 2797 | `default-enable-multibyte-characters' is non-nil. | 2806 | the default value of `enable-multibyte-characters' is non-nil. |
| 2798 | 2807 | ||
| 2799 | :sentinel SENTINEL -- Install SENTINEL as the process sentinel. | 2808 | :sentinel SENTINEL -- Install SENTINEL as the process sentinel. |
| 2800 | 2809 | ||
| @@ -4891,16 +4900,23 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, | |||
| 4891 | It can't hurt. */ | 4900 | It can't hurt. */ |
| 4892 | else if (nread == -1 && errno == EIO) | 4901 | else if (nread == -1 && errno == EIO) |
| 4893 | { | 4902 | { |
| 4894 | /* Don't do anything if only a pty, with no associated | 4903 | struct Lisp_Process *p = XPROCESS (proc); |
| 4895 | process (bug#10933). */ | 4904 | |
| 4896 | if (XPROCESS (proc)->pid != -2) { | 4905 | /* Clear the descriptor now, so we only raise the |
| 4897 | /* Clear the descriptor now, so we only raise the signal | 4906 | signal once. */ |
| 4898 | once. */ | 4907 | FD_CLR (channel, &input_wait_mask); |
| 4899 | FD_CLR (channel, &input_wait_mask); | 4908 | FD_CLR (channel, &non_keyboard_wait_mask); |
| 4900 | FD_CLR (channel, &non_keyboard_wait_mask); | 4909 | |
| 4901 | 4910 | if (p->pid == -2) | |
| 4902 | kill (getpid (), SIGCHLD); | 4911 | { |
| 4903 | } | 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); | ||
| 4904 | } | 4920 | } |
| 4905 | #endif /* HAVE_PTYS */ | 4921 | #endif /* HAVE_PTYS */ |
| 4906 | /* If we can detect process termination, don't consider the | 4922 | /* If we can detect process termination, don't consider the |