Switch to spawn for running sqitch

As system* seems to break sigaction picking up SIGINT.
This commit is contained in:
Christopher Baines 2024-04-02 12:02:07 +01:00
parent 6808532338
commit 1dc293c570

View file

@ -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)))