guix/nix
Ludovic Courtès 2d73086262
daemon: 'guix substitute' replies on FD 4.
This avoids the situation where error messages would unintentionally go
to stderr and be wrongfully interpreted as a reply by the daemon.

Fixes <https://bugs.gnu.org/46362>.
This is a followup to ee3226e9d5.

* guix/scripts/substitute.scm (display-narinfo-data): Add 'port'
parameter and honor it.
(process-query): Likewise.
(process-substitution): Likewise.
(%error-to-file-descriptor-4?, with-redirected-error-port): Remove.
(%reply-file-descriptor): New variable.
(guix-substitute): Remove use of 'with-redirected-error-port'.  Define
'reply-port' and pass it to 'process-query' and 'process-substitution'.
* nix/libstore/build.cc (SubstitutionGoal::handleChildOutput): Swap
'builderOut' and 'fromAgent'.
* nix/libstore/local-store.cc (LocalStore::getLineFromSubstituter):
Likewise.
* tests/substitute.scm <top level>: Set '%reply-file-descriptor'
rather than '%error-to-file-descriptor-4?'.
2021-04-09 17:46:38 +02:00
..
boost
libstore daemon: 'guix substitute' replies on FD 4. 2021-04-09 17:46:38 +02:00
libutil
nix-daemon daemon: Remove dead code. 2021-04-03 22:08:33 +02:00
.gitignore
AUTHORS Merge branch 'nix' into 'master'. 2014-12-19 22:47:37 +01:00
COPYING
local.mk gnu: guix: Fix openrc init scripts. 2021-03-30 10:29:33 +03:00