aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-04-02 12:02:07 +0100
committerChristopher Baines <mail@cbaines.net>2024-04-02 12:16:15 +0100
commit1dc293c5705efcfe51305d05f92142b9de52af1f (patch)
treedd9beae2f01fe331927ffe3535a66aaaed44ecf8 /guix-data-service
parent68085323388cf75e8ec2756a4f11a7005c7cd430 (diff)
downloaddata-service-1dc293c5705efcfe51305d05f92142b9de52af1f.tar
data-service-1dc293c5705efcfe51305d05f92142b9de52af1f.tar.gz
Switch to spawn for running sqitch
As system* seems to break sigaction picking up SIGINT.
Diffstat (limited to 'guix-data-service')
-rw-r--r--guix-data-service/database.scm11
1 files changed, 6 insertions, 5 deletions
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)))