diff options
Diffstat (limited to 'nix')
-rw-r--r-- | nix/libstore/build.cc | 4 | ||||
-rw-r--r-- | nix/libstore/local-store.cc | 12 | ||||
-rw-r--r-- | nix/local.mk | 2 | ||||
-rw-r--r-- | nix/nix-daemon/nix-daemon.cc | 9 | ||||
-rw-r--r-- | nix/nix-daemon/shared.hh | 9 |
5 files changed, 9 insertions, 27 deletions
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc index 4f486f0822..5697ae5a43 100644 --- a/nix/libstore/build.cc +++ b/nix/libstore/build.cc @@ -3158,13 +3158,13 @@ void SubstitutionGoal::finished() void SubstitutionGoal::handleChildOutput(int fd, const string & data) { if (verbosity >= settings.buildVerbosity - && fd == substituter->builderOut.readSide) { + && fd == substituter->fromAgent.readSide) { writeToStderr(data); /* Don't write substitution output to a log file for now. We probably should, though. */ } - if (fd == substituter->fromAgent.readSide) { + if (fd == substituter->builderOut.readSide) { /* DATA may consist of several lines. Process them one by one. */ string input = data; while (!input.empty()) { diff --git a/nix/libstore/local-store.cc b/nix/libstore/local-store.cc index c304e2ddd1..675d1ba66f 100644 --- a/nix/libstore/local-store.cc +++ b/nix/libstore/local-store.cc @@ -780,8 +780,8 @@ Path LocalStore::queryPathFromHashPart(const string & hashPart) }); } -/* Read a line from the substituter's stdout, while also processing - its stderr. */ +/* Read a line from the substituter's reply file descriptor, while also + processing its stderr. */ string LocalStore::getLineFromSubstituter(Agent & run) { string res, err; @@ -802,9 +802,9 @@ string LocalStore::getLineFromSubstituter(Agent & run) } /* Completely drain stderr before dealing with stdout. */ - if (FD_ISSET(run.builderOut.readSide, &fds)) { + if (FD_ISSET(run.fromAgent.readSide, &fds)) { char buf[4096]; - ssize_t n = read(run.builderOut.readSide, (unsigned char *) buf, sizeof(buf)); + ssize_t n = read(run.fromAgent.readSide, (unsigned char *) buf, sizeof(buf)); if (n == -1) { if (errno == EINTR) continue; throw SysError("reading from substituter's stderr"); @@ -822,9 +822,9 @@ string LocalStore::getLineFromSubstituter(Agent & run) } /* Read from stdout until we get a newline or the buffer is empty. */ - else if (FD_ISSET(run.fromAgent.readSide, &fds)) { + else if (FD_ISSET(run.builderOut.readSide, &fds)) { unsigned char c; - readFull(run.fromAgent.readSide, (unsigned char *) &c, 1); + readFull(run.builderOut.readSide, (unsigned char *) &c, 1); if (c == '\n') { if (!err.empty()) printMsg(lvlError, "substitute: " + err); return res; diff --git a/nix/local.mk b/nix/local.mk index d2ce349d9c..7c438ea78c 100644 --- a/nix/local.mk +++ b/nix/local.mk @@ -181,7 +181,7 @@ etc/init.d/guix-daemon: etc/init.d/guix-daemon.in \ mv "$@.tmp" "$@" # The service script for openrc. -openrcservicedir = $(sysconfdir)/init.d +openrcservicedir = $(sysconfdir)/openrc nodist_openrcservice_DATA = etc/openrc/guix-daemon etc/openrc/guix-daemon: etc/openrc/guix-daemon.in \ diff --git a/nix/nix-daemon/nix-daemon.cc b/nix/nix-daemon/nix-daemon.cc index 3dd156ba77..497de11a04 100644 --- a/nix/nix-daemon/nix-daemon.cc +++ b/nix/nix-daemon/nix-daemon.cc @@ -1046,12 +1046,3 @@ void run(const std::vector<int>& sockets) { daemonLoop(sockets); } - - -void printHelp() -{ - showManPage("nix-daemon"); -} - - -string programId = "nix-daemon"; diff --git a/nix/nix-daemon/shared.hh b/nix/nix-daemon/shared.hh index b45e9f0cfd..98ec97410b 100644 --- a/nix/nix-daemon/shared.hh +++ b/nix/nix-daemon/shared.hh @@ -20,18 +20,9 @@ #pragma once -#include <string> - #include <stdlib.h> #include <signal.h> -static inline void -showManPage (const char *name) -{ - /* This idea is evil. Abort. */ - abort (); -} - extern volatile ::sig_atomic_t blockInt; extern char **argvSaved; |