Revert "More pthreads cleanup."

This reverts commit 2a1bb4e646

Change-Id: Ia443d0748015c8e9fc3121e40e68258616767b51
This commit is contained in:
Elliott Hughes
2013-02-12 06:06:22 +00:00
committed by Gerrit Code Review
parent 2a1bb4e646
commit 6f94de3ca4
17 changed files with 291 additions and 362 deletions

View File

@@ -38,8 +38,6 @@
#include <sys/types.h>
#include <unistd.h>
#include "private/ErrnoRestorer.h"
class ScopedSignalBlocker {
public:
ScopedSignalBlocker() {
@@ -79,8 +77,9 @@ static FILE* __tmpfile_dir(const char* tmp_dir) {
struct stat sb;
int rc = fstat(fd, &sb);
if (rc == -1) {
ErrnoRestorer errno_restorer;
int old_errno = errno;
close(fd);
errno = old_errno;
return NULL;
}
}
@@ -92,8 +91,9 @@ static FILE* __tmpfile_dir(const char* tmp_dir) {
}
// Failure. Clean up. We already unlinked, so we just need to close.
ErrnoRestorer errno_restorer;
int old_errno = errno;
close(fd);
errno = old_errno;
return NULL;
}