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

Unified Diff: src/untrusted/nacl/waitpid.c

Issue 24908002: Provide IRT process interface Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 7 years, 3 months 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
« no previous file with comments | « src/untrusted/nacl/wait.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/untrusted/nacl/waitpid.c
diff --git a/src/untrusted/nacl/waitpid.c b/src/untrusted/nacl/waitpid.c
new file mode 100644
index 0000000000000000000000000000000000000000..51ab4c93200f13d7c99b11ca8182ed6ddfddfe07
--- /dev/null
+++ b/src/untrusted/nacl/waitpid.c
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2010 The Native Client 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 <sys/types.h>
+#include <sys/wait.h>
+#include <errno.h>
+
+#include "native_client/src/untrusted/nacl/nacl_irt.h"
+
+pid_t waitpid(pid_t pid, int *status, int options) {
+ if (__libnacl_irt_dev_process.waitpid == NULL) {
+ __libnacl_irt_process_init();
+ if (__libnacl_irt_dev_process.waitpid == NULL) {
+ errno = ENOSYS;
+ return -1;
+ }
+ }
+
+ int error = __libnacl_irt_dev_process.waitpid(&pid, status, options);
+ if (error) {
+ errno = error;
+ return -1;
+ }
+
+ return pid;
+}
« no previous file with comments | « src/untrusted/nacl/wait.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698