From 1dc293c5705efcfe51305d05f92142b9de52af1f Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 2 Apr 2024 12:02:07 +0100 Subject: Switch to spawn for running sqitch As system* seems to break sigaction picking up SIGINT. --- guix-data-service/database.scm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'guix-data-service') diff --git a/guix-data-service/database.scm b/guix-data-service/database.scm index 0b5175a..8af53da 100644 --- a/guix-data-service/database.scm +++ b/guix-data-service/database.scm @@ -169,11 +169,12 @@ params))))) (simple-format #t "running command: ~A\n" (string-join command)) - (unless (zero? (apply system* command)) - (simple-format - (current-error-port) - "error: sqitch command failed\n") - (exit 1)))))))) + (let ((pid (spawn (%config 'sqitch) command))) + (unless (= 0 (status:exit-val (cdr (waitpid pid)))) + (simple-format + (current-error-port) + "error: sqitch command failed\n") + (primitive-exit 1))))))))) (define* (with-postgresql-connection name f #:key (statement-timeout #f)) (let ((conn (open-postgresql-connection name statement-timeout))) -- cgit v1.2.3