1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-26 12:10:59 +01:00

Merged R9105

This commit is contained in:
Wouter den Breejen 2007-10-08 11:58:34 +00:00
parent 00602dd20c
commit dacf2e0e87
28 changed files with 503 additions and 502 deletions

View file

@ -24,13 +24,13 @@ extern char * * environ;
namespace nix {
Error::Error(const format & f)
BaseError::BaseError(const format & f)
{
err = f.str();
}
Error & Error::addPrefix(const format & f)
BaseError & BaseError::addPrefix(const format & f)
{
err = f.str() + err;
return *this;
@ -494,6 +494,7 @@ string drainFD(int fd)
string result;
unsigned char buffer[4096];
while (1) {
checkInterrupt();
ssize_t rd = read(fd, buffer, sizeof buffer);
if (rd == -1) {
if (errno != EINTR)
@ -777,6 +778,8 @@ void killUser(uid_t uid)
string runProgram(Path program, bool searchPath, const Strings & args)
{
checkInterrupt();
/* Create a pipe. */
Pipe pipe;
pipe.create();