aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorKenichi Handa2011-08-14 13:51:08 -0400
committerChong Yidong2011-08-14 13:51:08 -0400
commit5cf2b69bdba39fd653d34c74e207ac3e4c48260d (patch)
tree0d84c05b6209ff14d1218468162b3dd7a276a008 /src/process.c
parentdaf17d00fb0ed36ed98edd3f9eec9def0ac59f1c (diff)
downloademacs-5cf2b69bdba39fd653d34c74e207ac3e4c48260d.tar.gz
emacs-5cf2b69bdba39fd653d34c74e207ac3e4c48260d.zip
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.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c5
1 files changed, 4 insertions, 1 deletions
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)
1643 1643
1644 XPROCESS (process)->pty_flag = pty_flag; 1644 XPROCESS (process)->pty_flag = pty_flag;
1645 XPROCESS (process)->status = Qrun; 1645 XPROCESS (process)->status = Qrun;
1646 setup_process_coding_systems (process);
1647 1646
1648 /* Delay interrupts until we have a chance to store 1647 /* Delay interrupts until we have a chance to store
1649 the new fork's pid in its process structure */ 1648 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)
1678 processes to get their return values scrambled. */ 1677 processes to get their return values scrambled. */
1679 XPROCESS (process)->pid = -1; 1678 XPROCESS (process)->pid = -1;
1680 1679
1680 /* This must be called after the above line because it may signal an
1681 error. */
1682 setup_process_coding_systems (process);
1683
1681 BLOCK_INPUT; 1684 BLOCK_INPUT;
1682 1685
1683 { 1686 {