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 ee3226e9d54891c7e696912245e4904435be191c.

* 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
..
2021-04-02 18:04:24 +02:00
2021-03-06 11:41:48 +01:00
2019-12-15 00:34:05 +01:00
2021-01-31 21:49:58 +01:00
2020-07-05 03:15:08 +05:30
2020-10-12 11:28:56 +02:00
2021-01-04 23:54:16 +01:00
2020-07-05 16:07:59 +05:30
2021-04-02 23:22:14 +02:00
2020-12-09 22:25:17 +01:00
2020-04-17 23:36:47 +02:00
2021-01-04 23:54:16 +01:00
2021-01-04 23:54:16 +01:00
2021-03-13 22:51:18 +01:00
2020-12-19 23:25:01 +01:00
2021-03-10 18:01:48 +01:00