diff options
| author | Tom Tromey | 2013-01-05 19:36:45 -0700 |
|---|---|---|
| committer | Tom Tromey | 2013-01-05 19:36:45 -0700 |
| commit | e078a23febca14bc919c5806670479c395e3253e (patch) | |
| tree | e9e4ed91feef744d525264c31974c3ed00146bcd /src/process.c | |
| parent | 63d535c829a930207b64fe733228f15a554644b1 (diff) | |
| parent | 7a2657fa3bedbd977f4e11fe030cb4a210c04ab4 (diff) | |
| download | emacs-e078a23febca14bc919c5806670479c395e3253e.tar.gz emacs-e078a23febca14bc919c5806670479c395e3253e.zip | |
merge from trunk
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/src/process.c b/src/process.c index 788c9176349..d56819da67a 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Asynchronous subprocess control for GNU Emacs. | 1 | /* Asynchronous subprocess control for GNU Emacs. |
| 2 | 2 | ||
| 3 | Copyright (C) 1985-1988, 1993-1996, 1998-1999, 2001-2012 | 3 | Copyright (C) 1985-1988, 1993-1996, 1998-1999, 2001-2013 Free Software |
| 4 | Free Software Foundation, Inc. | 4 | Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 7 | 7 | ||
| @@ -4941,11 +4941,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4941 | Therefore, if we get an error reading and errno = | 4941 | Therefore, if we get an error reading and errno = |
| 4942 | EIO, just continue, because the child process has | 4942 | EIO, just continue, because the child process has |
| 4943 | exited and should clean itself up soon (e.g. when we | 4943 | exited and should clean itself up soon (e.g. when we |
| 4944 | get a SIGCHLD). | 4944 | get a SIGCHLD). */ |
| 4945 | |||
| 4946 | However, it has been known to happen that the SIGCHLD | ||
| 4947 | got lost. So raise the signal again just in case. | ||
| 4948 | It can't hurt. */ | ||
| 4949 | else if (nread == -1 && errno == EIO) | 4945 | else if (nread == -1 && errno == EIO) |
| 4950 | { | 4946 | { |
| 4951 | struct Lisp_Process *p = XPROCESS (proc); | 4947 | struct Lisp_Process *p = XPROCESS (proc); |
| @@ -4962,8 +4958,6 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4962 | p->tick = ++process_tick; | 4958 | p->tick = ++process_tick; |
| 4963 | pset_status (p, Qfailed); | 4959 | pset_status (p, Qfailed); |
| 4964 | } | 4960 | } |
| 4965 | else | ||
| 4966 | handle_child_signal (SIGCHLD); | ||
| 4967 | } | 4961 | } |
| 4968 | #endif /* HAVE_PTYS */ | 4962 | #endif /* HAVE_PTYS */ |
| 4969 | /* If we can detect process termination, don't consider the | 4963 | /* If we can detect process termination, don't consider the |
| @@ -5724,19 +5718,19 @@ it is sent in several bunches. This may happen even for shorter regions. | |||
| 5724 | Output from processes can arrive in between bunches. */) | 5718 | Output from processes can arrive in between bunches. */) |
| 5725 | (Lisp_Object process, Lisp_Object start, Lisp_Object end) | 5719 | (Lisp_Object process, Lisp_Object start, Lisp_Object end) |
| 5726 | { | 5720 | { |
| 5727 | Lisp_Object proc; | 5721 | Lisp_Object proc = get_process (process); |
| 5728 | ptrdiff_t start1, end1; | 5722 | ptrdiff_t start_byte, end_byte; |
| 5729 | 5723 | ||
| 5730 | proc = get_process (process); | ||
| 5731 | validate_region (&start, &end); | 5724 | validate_region (&start, &end); |
| 5732 | 5725 | ||
| 5726 | start_byte = CHAR_TO_BYTE (XINT (start)); | ||
| 5727 | end_byte = CHAR_TO_BYTE (XINT (end)); | ||
| 5728 | |||
| 5733 | if (XINT (start) < GPT && XINT (end) > GPT) | 5729 | if (XINT (start) < GPT && XINT (end) > GPT) |
| 5734 | move_gap (XINT (start)); | 5730 | move_gap_both (XINT (start), start_byte); |
| 5735 | 5731 | ||
| 5736 | start1 = CHAR_TO_BYTE (XINT (start)); | 5732 | send_process (proc, (char *) BYTE_POS_ADDR (start_byte), |
| 5737 | end1 = CHAR_TO_BYTE (XINT (end)); | 5733 | end_byte - start_byte, Fcurrent_buffer ()); |
| 5738 | send_process (proc, (char *) BYTE_POS_ADDR (start1), end1 - start1, | ||
| 5739 | Fcurrent_buffer ()); | ||
| 5740 | 5734 | ||
| 5741 | return Qnil; | 5735 | return Qnil; |
| 5742 | } | 5736 | } |