guix/nix/libstore
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
..
.gitignore nix: Tweak .gitignore files. 2020-06-24 19:55:22 +01:00
build.cc daemon: 'guix substitute' replies on FD 4. 2021-04-09 17:46:38 +02:00
builtins.cc daemon: Run 'guix perform-download' directly. 2019-09-08 11:49:24 +02:00
builtins.hh
derivations.cc
derivations.hh
gc.cc daemon: Handle EXDEV when moving to trash directory. 2020-06-06 15:43:35 -07:00
globals.cc daemon: Remove 'NIX_LIBEXEC_DIR'. 2019-09-08 11:49:24 +02:00
globals.hh daemon: Remove 'NIX_LIBEXEC_DIR'. 2019-09-08 11:49:24 +02:00
local-store.cc daemon: 'guix substitute' replies on FD 4. 2021-04-09 17:46:38 +02:00
local-store.hh daemon: Factorize substituter agent spawning. 2020-12-08 22:30:08 +01:00
misc.cc
misc.hh
optimise-store.cc daemon: Correctly handle EMLINK corner case when deduplicating. 2020-06-25 12:29:22 +02:00
pathlocks.cc
pathlocks.hh
references.cc
references.hh
sqlite.cc
sqlite.hh
store-api.cc daemon: Replace "illegal" by "invalid" in error messages. 2019-06-13 00:44:01 +02:00
store-api.hh daemon: Make 'profiles/per-user' non-world-writable. 2019-10-16 22:53:40 +02:00
worker-protocol.hh daemon: Support multiplexed build output. 2018-10-15 22:40:35 +02:00