diff options
| author | Troels Nielsen | 2012-03-23 08:23:14 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-03-23 08:23:14 -0400 |
| commit | 5063c0e1a29078fb72ef5e48e1eeed6a863128ac (patch) | |
| tree | 6895409e31f91197c4ef98bfef09fa4e30694a76 /src | |
| parent | 005a89ffd3550983ca3c85334d79c7fad633c9c0 (diff) | |
| download | emacs-5063c0e1a29078fb72ef5e48e1eeed6a863128ac.tar.gz emacs-5063c0e1a29078fb72ef5e48e1eeed6a863128ac.zip | |
* src/process.c (wait_reading_process_output): Handle pty disconnect
by refraining from sending oneself a SIGCHLD.
Fixes: debbugs:10933
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 11 | ||||
| -rw-r--r-- | src/process.c | 19 |
2 files changed, 20 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e3407a45514..40186c65496 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,8 +1,13 @@ | |||
| 1 | 2012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change) | ||
| 2 | |||
| 3 | * process.c (wait_reading_process_output): Handle pty disconnect | ||
| 4 | by refraining from sending oneself a SIGCHLD (bug#10933). | ||
| 5 | |||
| 1 | 2012-03-22 Chong Yidong <cyd@gnu.org> | 6 | 2012-03-22 Chong Yidong <cyd@gnu.org> |
| 2 | 7 | ||
| 3 | * dispextern.h (struct it): New member string_from_prefix_prop_p. | 8 | * dispextern.h (struct it): New member string_from_prefix_prop_p. |
| 4 | 9 | ||
| 5 | * xdisp.c (push_prefix_prop): Renamed from push_display_prop. | 10 | * xdisp.c (push_prefix_prop): Rename from push_display_prop. |
| 6 | Mark string as coming from a prefix property. | 11 | Mark string as coming from a prefix property. |
| 7 | (handle_face_prop): Use default face for prefix strings (Bug#4281). | 12 | (handle_face_prop): Use default face for prefix strings (Bug#4281). |
| 8 | (pop_it, reseat_1): Save and restore string_from_prefix_prop_p. | 13 | (pop_it, reseat_1): Save and restore string_from_prefix_prop_p. |
| @@ -14,8 +19,8 @@ | |||
| 14 | 2012-03-20 Eli Zaretskii <eliz@gnu.org> | 19 | 2012-03-20 Eli Zaretskii <eliz@gnu.org> |
| 15 | 20 | ||
| 16 | * w32proc.c (Fw32_set_console_codepage) | 21 | * w32proc.c (Fw32_set_console_codepage) |
| 17 | (Fw32_set_console_output_codepage, Fw32_get_codepage_charset): Doc | 22 | (Fw32_set_console_output_codepage, Fw32_get_codepage_charset): |
| 18 | fixes. | 23 | Doc fixes. |
| 19 | 24 | ||
| 20 | 2012-03-20 Chong Yidong <cyd@gnu.org> | 25 | 2012-03-20 Chong Yidong <cyd@gnu.org> |
| 21 | 26 | ||
diff --git a/src/process.c b/src/process.c index bdf16b7dbd2..f2f33a9eafc 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -4888,15 +4888,20 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, | |||
| 4888 | It can't hurt. */ | 4888 | It can't hurt. */ |
| 4889 | else if (nread == -1 && errno == EIO) | 4889 | else if (nread == -1 && errno == EIO) |
| 4890 | { | 4890 | { |
| 4891 | /* Clear the descriptor now, so we only raise the signal once. */ | 4891 | /* Don't do anything if only a pty, with no associated |
| 4892 | FD_CLR (channel, &input_wait_mask); | 4892 | process (bug#10933). */ |
| 4893 | FD_CLR (channel, &non_keyboard_wait_mask); | 4893 | if (XPROCESS (proc)->pid != -2) { |
| 4894 | 4894 | /* Clear the descriptor now, so we only raise the signal | |
| 4895 | kill (getpid (), SIGCHLD); | 4895 | once. */ |
| 4896 | FD_CLR (channel, &input_wait_mask); | ||
| 4897 | FD_CLR (channel, &non_keyboard_wait_mask); | ||
| 4898 | |||
| 4899 | kill (getpid (), SIGCHLD); | ||
| 4900 | } | ||
| 4896 | } | 4901 | } |
| 4897 | #endif /* HAVE_PTYS */ | 4902 | #endif /* HAVE_PTYS */ |
| 4898 | /* If we can detect process termination, don't consider the process | 4903 | /* If we can detect process termination, don't consider the |
| 4899 | gone just because its pipe is closed. */ | 4904 | process gone just because its pipe is closed. */ |
| 4900 | #ifdef SIGCHLD | 4905 | #ifdef SIGCHLD |
| 4901 | else if (nread == 0 && !NETCONN_P (proc) && !SERIALCONN_P (proc)) | 4906 | else if (nread == 0 && !NETCONN_P (proc) && !SERIALCONN_P (proc)) |
| 4902 | ; | 4907 | ; |