| Index: src/untrusted/nacl/wait.c
|
| diff --git a/src/untrusted/nacl/wait.c b/src/untrusted/nacl/wait.c
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5a890ab7b01046bd5439dcbf64bda80657ec0b2d
|
| --- /dev/null
|
| +++ b/src/untrusted/nacl/wait.c
|
| @@ -0,0 +1,30 @@
|
| +/*
|
| + * 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 wait(int *status) {
|
| + if (__libnacl_irt_dev_process.wait == NULL) {
|
| + __libnacl_irt_process_init();
|
| + if (__libnacl_irt_dev_process.wait == NULL) {
|
| + errno = ENOSYS;
|
| + return -1;
|
| + }
|
| + }
|
| +
|
| + pid_t pid;
|
| + int error = __libnacl_irt_dev_process.wait(&pid, status);
|
| + if (error) {
|
| + errno = error;
|
| + return -1;
|
| + }
|
| +
|
| + return pid;
|
| +}
|
|
|