From: Kenichi Handa Date: Sun, 14 Aug 2011 17:51:08 +0000 (-0400) Subject: Avoid crash with invalid default-process-coding-system. X-Git-Tag: emacs-pretest-24.0.90~104^2~124^2~53 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5cf2b69bdba39fd653d34c74e207ac3e4c48260d;p=emacs.git Avoid crash with invalid default-process-coding-system. * src/process.c (create_process): Call setup_process_coding_systems after the pid of the process is set to -1. --- diff --git a/src/ChangeLog b/src/ChangeLog index b5da1be5c7d..40a0ed24e6a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-08-14 Kenichi Handa + + * process.c (create_process): Call setup_process_coding_systems + after the pid of the process is set to -1. + 2011-08-14 Eli Zaretskii * xdisp.c (move_it_in_display_line_to): Don't invoke diff --git a/src/process.c b/src/process.c index 9d20d0c2b09..71a6f91a7bb 100644 --- a/src/process.c +++ b/src/process.c @@ -1643,7 +1643,6 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) XPROCESS (process)->pty_flag = pty_flag; XPROCESS (process)->status = Qrun; - setup_process_coding_systems (process); /* Delay interrupts until we have a chance to store the new fork's pid in its process structure */ @@ -1678,6 +1677,10 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) processes to get their return values scrambled. */ XPROCESS (process)->pid = -1; + /* This must be called after the above line because it may signal an + error. */ + setup_process_coding_systems (process); + BLOCK_INPUT; {