Use line buffering for the input and output ports

As these are used for logging, which is done on a line by line basis. Remove
the now redundant calls to (force-output).
This commit is contained in:
Christopher Baines 2019-06-17 16:58:31 +01:00
parent 7f0a0ed3b1
commit 3df0b43146
4 changed files with 6 additions and 7 deletions

View file

@ -27,6 +27,9 @@
(guix-data-service database)
(guix-data-service jobs))
(setvbuf (current-output-port) 'line)
(setvbuf (current-error-port) 'line)
(with-postgresql-connection
(lambda (conn)
(simple-format #t "Ready to process jobs...\n")

View file

@ -80,6 +80,9 @@
(error "extraneous argument" arg))
%default-options))
(setvbuf (current-output-port) 'line)
(setvbuf (current-error-port) 'line)
(let ((opts (parse-options (cdr (program-arguments)))))
(let ((repl-port (assoc-ref opts 'listen-repl)))
(when repl-port