diff options
| author | Paul Eggert | 2012-12-07 09:53:17 -0800 |
|---|---|---|
| committer | Paul Eggert | 2012-12-07 09:53:17 -0800 |
| commit | 9cdde1e2dfdd7b1a4e52294bca1467dc7a48c77a (patch) | |
| tree | b902aac5c5960d26175de53b1b9aeea50a9b486a | |
| parent | 2e4ad7e5a46fe2e2bf725194d7fafe8052093a22 (diff) | |
| download | emacs-9cdde1e2dfdd7b1a4e52294bca1467dc7a48c77a.tar.gz emacs-9cdde1e2dfdd7b1a4e52294bca1467dc7a48c77a.zip | |
* sysdep.c (get_child_status): Abort on internal error (Bug#13086).
This will cause a production Emacs to dump core instead of
infinite-looping.
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/sysdep.c | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index a8be140ca0e..edd6924af50 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-12-07 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * sysdep.c (get_child_status): Abort on internal error (Bug#13086). | ||
| 4 | This will cause a production Emacs to dump core instead of | ||
| 5 | infinite-looping. | ||
| 6 | |||
| 1 | 2012-12-07 Dmitry Antipov <dmantipov@yandex.ru> | 7 | 2012-12-07 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 8 | ||
| 3 | * frame.c (make_frame): Do not set window's buffer to t. | 9 | * frame.c (make_frame): Do not set window's buffer to t. |
diff --git a/src/sysdep.c b/src/sysdep.c index 7068a4f0977..9c904850401 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -289,9 +289,12 @@ get_child_status (pid_t child, int *status, int options, bool interruptible) | |||
| 289 | 289 | ||
| 290 | while ((pid = waitpid (child, status, options)) < 0) | 290 | while ((pid = waitpid (child, status, options)) < 0) |
| 291 | { | 291 | { |
| 292 | /* CHILD must be a child process that has not been reaped, and | 292 | /* Check that CHILD is a child process that has not been reaped, |
| 293 | STATUS and OPTIONS must be valid. */ | 293 | and that STATUS and OPTIONS are valid. Otherwise abort, |
| 294 | eassert (errno == EINTR); | 294 | as continuing after this internal error could cause Emacs to |
| 295 | become confused and kill innocent-victim processes. */ | ||
| 296 | if (errno != EINTR) | ||
| 297 | emacs_abort (); | ||
| 295 | 298 | ||
| 296 | /* Note: the MS-Windows emulation of waitpid calls QUIT | 299 | /* Note: the MS-Windows emulation of waitpid calls QUIT |
| 297 | internally. */ | 300 | internally. */ |