1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 22:01:15 +02:00

Don't use std::cerr in a few places

Slightly scared of using std::cerr in a vforked process...
This commit is contained in:
Eelco Dolstra 2012-11-15 15:01:02 +01:00
parent 3acc8adcad
commit 8541d27fce
5 changed files with 34 additions and 30 deletions

View file

@ -6,7 +6,6 @@
#include "archive.hh"
#include "globals.hh"
#include <iostream>
#include <cstring>
#include <unistd.h>
#include <signal.h>
@ -642,7 +641,7 @@ static void processConnection()
{
canSendStderr = false;
myPid = getpid();
writeToStderr = tunnelStderr;
_writeToStderr = tunnelStderr;
#ifdef HAVE_HUP_NOTIFICATION
/* Allow us to receive SIGPOLL for events on the client socket. */
@ -877,7 +876,7 @@ static void daemonLoop()
processConnection();
} catch (std::exception & e) {
std::cerr << format("child error: %1%\n") % e.what();
writeToStderr("child error: " + string(e.what()) + "\n");
}
exit(0);
}