summaryrefslogtreecommitdiff
path: root/src/coding.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2019-02-06 17:31:26 +0200
committerEli Zaretskii <eliz@gnu.org>2019-02-06 17:31:26 +0200
commita03de1e2a33a35caf2715b2645aef0a52072b4b2 (patch)
tree5dcc00b50c983289782bcf379d2fc425f0c57e57 /src/coding.c
parent19fbef549a94ccf733367d29438204e94a00e911 (diff)
downloademacs-a03de1e2a33a35caf2715b2645aef0a52072b4b2.tar.gz
emacs-a03de1e2a33a35caf2715b2645aef0a52072b4b2.tar.bz2
emacs-a03de1e2a33a35caf2715b2645aef0a52072b4b2.zip
Prevent segfaults when running inside docker
* src/coding.c (syms_of_coding): New symbol Qus_ascii. (reset_coding_after_pdumper_load): Call set-safe-terminal-system-internal to set up safe_terminal_coding after restoring from pdump file. Reported by Philippe Vaucher <philippe.vaucher@gmail.com>.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/coding.c b/src/coding.c
index 6de8dcd1ffe..e470757f92e 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -10831,6 +10831,7 @@ syms_of_coding (void)
DEFSYM (Qundecided, "undecided");
DEFSYM (Qno_conversion, "no-conversion");
DEFSYM (Qraw_text, "raw-text");
+ DEFSYM (Qus_ascii, "us-ascii");
DEFSYM (Qiso_2022, "iso-2022");
@@ -11341,4 +11342,9 @@ reset_coding_after_pdumper_load (void)
setup_coding_system (CODING_ID_NAME (id), this);
}
}
+ /* In temacs the below is done by mule-conf.el, because we need to
+ define us-ascii first. But in dumped Emacs us-ascii is restored
+ by the above loop, and mule-conf.el will not be loaded, so we set
+ it up now; otherwise safe_terminal_coding will remain zeroed. */
+ Fset_safe_terminal_coding_system_internal (Qus_ascii);
}