summaryrefslogtreecommitdiffstats
path: root/sandbox/linux/seccomp/getpid.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/linux/seccomp/getpid.cc')
-rw-r--r--sandbox/linux/seccomp/getpid.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/sandbox/linux/seccomp/getpid.cc b/sandbox/linux/seccomp/getpid.cc
new file mode 100644
index 0000000..be5449b
--- /dev/null
+++ b/sandbox/linux/seccomp/getpid.cc
@@ -0,0 +1,17 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "debug.h"
+#include "sandbox_impl.h"
+
+namespace playground {
+
+long Sandbox::sandbox_getpid() {
+ long long tm;
+ Debug::syscall(&tm, __NR_getpid, "Executing handler");
+ Debug::elapsed(tm, __NR_getpid);
+ return pid_;
+}
+
+} // namespace