Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: base/file_util.h

Issue 100253002: Don't HANDLE_EINTR(close). Either IGNORE_EINTR(close) or just close. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/debug/debugger_posix.cc ('k') | base/file_util_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file contains utility functions for dealing with the local 5 // This file contains utility functions for dealing with the local
6 // filesystem. 6 // filesystem.
7 7
8 #ifndef BASE_FILE_UTIL_H_ 8 #ifndef BASE_FILE_UTIL_H_
9 #define BASE_FILE_UTIL_H_ 9 #define BASE_FILE_UTIL_H_
10 10
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 }; 407 };
408 408
409 typedef scoped_ptr_malloc<FILE, ScopedFILEClose> ScopedFILE; 409 typedef scoped_ptr_malloc<FILE, ScopedFILEClose> ScopedFILE;
410 410
411 #if defined(OS_POSIX) 411 #if defined(OS_POSIX)
412 // A class to handle auto-closing of FDs. 412 // A class to handle auto-closing of FDs.
413 class ScopedFDClose { 413 class ScopedFDClose {
414 public: 414 public:
415 inline void operator()(int* x) const { 415 inline void operator()(int* x) const {
416 if (x && *x >= 0) { 416 if (x && *x >= 0) {
417 if (HANDLE_EINTR(close(*x)) < 0) 417 if (IGNORE_EINTR(close(*x)) < 0)
418 DPLOG(ERROR) << "close"; 418 DPLOG(ERROR) << "close";
419 } 419 }
420 } 420 }
421 }; 421 };
422 422
423 typedef scoped_ptr_malloc<int, ScopedFDClose> ScopedFD; 423 typedef scoped_ptr_malloc<int, ScopedFDClose> ScopedFD;
424 #endif // OS_POSIX 424 #endif // OS_POSIX
425 425
426 #if defined(OS_LINUX) 426 #if defined(OS_LINUX)
427 // Broad categories of file systems as returned by statfs() on Linux. 427 // Broad categories of file systems as returned by statfs() on Linux.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 // This function simulates Move(), but unlike Move() it works across volumes. 467 // This function simulates Move(), but unlike Move() it works across volumes.
468 // This function is not transactional. 468 // This function is not transactional.
469 BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath& from_path, 469 BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath& from_path,
470 const FilePath& to_path); 470 const FilePath& to_path);
471 #endif // defined(OS_WIN) 471 #endif // defined(OS_WIN)
472 472
473 } // namespace internal 473 } // namespace internal
474 } // namespace base 474 } // namespace base
475 475
476 #endif // BASE_FILE_UTIL_H_ 476 #endif // BASE_FILE_UTIL_H_
OLDNEW
« no previous file with comments | « base/debug/debugger_posix.cc ('k') | base/file_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698