summaryrefslogtreecommitdiff
path: root/gnu/installer.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2022-10-31 13:03:46 +0100
committerMathieu Othacehe <othacehe@gnu.org>2022-11-02 15:52:19 +0100
commit80387bc7c3966602800116f5be3893c3d3044a96 (patch)
treece2398404fea5837748fb58d6f1faa34de0e17ad /gnu/installer.scm
parent868a1e7f320616e6a13aa23ea1ab86f7d40ddfdb (diff)
installer: Add core dump support.
Fixes: <https://issues.guix.gnu.org/58733> * gnu/installer.scm (installer-program): Enable core dump generation. * gnu/installer/dump.scm (%core-dump): New variable. (prepare-dump): Copy the core dump file. * gnu/installer/newt/welcome.scm (run-welcome-page): Propose to report an installation that previously generated a core dump.
Diffstat (limited to 'gnu/installer.scm')
-rw-r--r--gnu/installer.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/gnu/installer.scm b/gnu/installer.scm
index 8a6e604fa5..52c595b5b7 100644
--- a/gnu/installer.scm
+++ b/gnu/installer.scm
@@ -389,6 +389,12 @@ selected keymap."
(ice-9 match)
(ice-9 textual-ports))
+ ;; Enable core dump generation.
+ (setrlimit 'core #f #f)
+ (call-with-output-file "/proc/sys/kernel/core_pattern"
+ (lambda (port)
+ (format port %core-dump)))
+
;; Initialize gettext support so that installers can use
;; (guix i18n) module.
#$init-gettext