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

Unified Diff: sandbox/linux/services/scoped_process.cc

Issue 684993005: Linux sandbox: start adding syscall wrappers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More dependencies. Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: sandbox/linux/services/scoped_process.cc
diff --git a/sandbox/linux/services/scoped_process.cc b/sandbox/linux/services/scoped_process.cc
index fd42a2a6e17464c89739a14971fe72c8078ed500..bdeaee944f5ed8a51a3bf37541a9ca918f60dd89 100644
--- a/sandbox/linux/services/scoped_process.cc
+++ b/sandbox/linux/services/scoped_process.cc
@@ -17,6 +17,7 @@
#include "base/logging.h"
#include "base/posix/eintr_wrapper.h"
#include "build/build_config.h"
+#include "sandbox/linux/services/syscall_wrappers.h"
#include "sandbox/linux/services/thread_helpers.h"
namespace sandbox {
@@ -112,7 +113,7 @@ bool ScopedProcess::WaitForClosureToRun() {
// This method allows to assert it is not happening.
bool ScopedProcess::IsOriginalProcess() {
// Make a direct syscall to bypass glibc caching of PIDs.
- int pid = syscall(__NR_getpid);
+ pid_t pid = sys_getpid();
return pid == process_id_;
}

Powered by Google App Engine
This is Rietveld 408576698