mirror of
https://github.com/NixOS/nix
synced 2025-06-30 19:57:59 +02:00
Clean up standard stream logic
Now we have enough portability stuff
This commit is contained in:
parent
0ed5af164f
commit
372353722e
9 changed files with 44 additions and 18 deletions
|
@ -38,7 +38,7 @@ void Logger::warn(const std::string & msg)
|
|||
|
||||
void Logger::writeToStdout(std::string_view s)
|
||||
{
|
||||
Descriptor standard_out = getStandardOut();
|
||||
Descriptor standard_out = getStandardOutput();
|
||||
writeFull(standard_out, s);
|
||||
writeFull(standard_out, "\n");
|
||||
}
|
||||
|
@ -118,11 +118,7 @@ void writeToStderr(std::string_view s)
|
|||
{
|
||||
try {
|
||||
writeFull(
|
||||
#ifdef _WIN32
|
||||
GetStdHandle(STD_ERROR_HANDLE),
|
||||
#else
|
||||
STDERR_FILENO,
|
||||
#endif
|
||||
getStandardError(),
|
||||
s, false);
|
||||
} catch (SystemError & e) {
|
||||
/* Ignore failing writes to stderr. We need to ignore write
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue