Merge branch 'master' of ssh://github.com/google/nsjail
This commit is contained in:
commit
2bee68f9df
@ -383,8 +383,7 @@ static bool initParent(nsjconf_t* nsjconf, pid_t pid, int pipefd) {
|
|||||||
LOG_E("Couldn't initialize user namespace for pid %d", pid);
|
LOG_E("Couldn't initialize user namespace for pid %d", pid);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (util::writeToFd(pipefd, &kSubprocDoneChar, sizeof(kSubprocDoneChar)) !=
|
if (!util::writeToFd(pipefd, &kSubprocDoneChar, sizeof(kSubprocDoneChar))) {
|
||||||
sizeof(kSubprocDoneChar)) {
|
|
||||||
LOG_E("Couldn't signal the new process via a socketpair");
|
LOG_E("Couldn't signal the new process via a socketpair");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
2
util.cc
2
util.cc
@ -75,7 +75,7 @@ ssize_t readFromFile(const char* fname, void* buf, size_t len) {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize_t writeToFd(int fd, const void* buf, size_t len) {
|
bool writeToFd(int fd, const void* buf, size_t len) {
|
||||||
const uint8_t* charbuf = (const uint8_t*)buf;
|
const uint8_t* charbuf = (const uint8_t*)buf;
|
||||||
|
|
||||||
size_t writtenSz = 0;
|
size_t writtenSz = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user