diff options
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 019caf306b7..1a91eb0f1a3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,62 @@ | |||
| 1 | 2012-12-03 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2012-12-03 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Don't let call-process be a zombie factory (Bug#12980). | ||
| 4 | Fixing this bug required some cleanup of the signal-handling code. | ||
| 5 | As a side effect, this change also fixes a longstanding rare race | ||
| 6 | condition whereby Emacs could mistakenly kill unrelated processes, | ||
| 7 | and it fixes a bug where a second C-g does not kill a recalcitrant | ||
| 8 | synchronous process in GNU/Linux and similar platforms. | ||
| 9 | The patch should also fix the last vestiges of Bug#9488, | ||
| 10 | a bug which has mostly been fixed on the trunk by other changes. | ||
| 11 | * callproc.c, process.h (synch_process_alive, synch_process_death) | ||
| 12 | (synch_process_termsig, sync_process_retcode): | ||
| 13 | Remove. All uses removed, to simplify analysis and so that | ||
| 14 | less consing is done inside critical sections. | ||
| 15 | * callproc.c (call_process_exited): Remove. All uses replaced | ||
| 16 | with !synch_process_pid. | ||
| 17 | * callproc.c (synch_process_pid, synch_process_fd): New static vars. | ||
| 18 | These take the role of what used to be in unwind-protect arg. | ||
| 19 | All uses changed. | ||
| 20 | (block_child_signal, unblock_child_signal): | ||
| 21 | New functions, to avoid races that could kill innocent-victim processes. | ||
| 22 | (call_process_kill, call_process_cleanup, Fcall_process): Use them. | ||
| 23 | (call_process_kill): Record killed processes as deleted, so that | ||
| 24 | zombies do not clutter up the system. Do this inside a critical | ||
| 25 | section, to avoid a race that would allow the clutter. | ||
| 26 | (call_process_cleanup): Fix code so that the second C-g works again | ||
| 27 | on common platforms such as GNU/Linux. | ||
| 28 | (Fcall_process): Create the child process in a critical section, | ||
| 29 | to fix a race condition. If creating an asynchronous process, | ||
| 30 | record it as deleted so that zombies do not clutter up the system. | ||
| 31 | Do unwind-protect for WINDOWSNT too, as that's simpler in the | ||
| 32 | light of these changes. Omit unnecessary call to emacs_close | ||
| 33 | before failure, as the unwind-protect code does that. | ||
| 34 | * callproc.c (call_process_cleanup): | ||
| 35 | * w32proc.c (waitpid): Simplify now that synch_process_alive is gone. | ||
| 36 | * process.c (record_deleted_pid): New function, containing | ||
| 37 | code refactored out of Fdelete_process. | ||
| 38 | (Fdelete_process): Use it. | ||
| 39 | (process_status_retrieved): Remove. All callers changed to use | ||
| 40 | child_status_change. | ||
| 41 | (record_child_status_change): Remove, folding its contents into ... | ||
| 42 | (handle_child_signal): ... this signal handler. Now, this | ||
| 43 | function is purely a handler for SIGCHLD, and is not called after | ||
| 44 | a synchronous waitpid returns; the synchronous code is moved to | ||
| 45 | wait_for_termination. There is no need to worry about reaping | ||
| 46 | more than one child now. | ||
| 47 | * sysdep.c (get_child_status, child_status_changed): New functions. | ||
| 48 | (wait_for_termination): Now takes int * status and bool | ||
| 49 | interruptible arguments, too. Do not record child status change; | ||
| 50 | that's now the caller's responsibility. All callers changed. | ||
| 51 | Reimplement in terms of get_child_status. | ||
| 52 | (wait_for_termination_1, interruptible_wait_for_termination): | ||
| 53 | Remove. All callers changed to use wait_for_termination. | ||
| 54 | * syswait.h: Include <stdbool.h>, for bool. | ||
| 55 | (record_child_status_change, interruptible_wait_for_termination): | ||
| 56 | Remove decls. | ||
| 57 | (record_deleted_pid, child_status_changed): New decls. | ||
| 58 | (wait_for_termination): Adjust to API changes noted above. | ||
| 59 | |||
| 3 | * bytecode.c, lisp.h (Qbytecode): Remove. | 60 | * bytecode.c, lisp.h (Qbytecode): Remove. |
| 4 | No longer needed after 2012-11-20 interactive-p changes. | 61 | No longer needed after 2012-11-20 interactive-p changes. |
| 5 | 62 | ||