OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2013 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <unistd.h> | 8 #include <signal.h> |
9 | 9 |
10 #include "native_client/src/untrusted/nacl/nacl_irt.h" | 10 #include "native_client/src/untrusted/nacl/nacl_irt.h" |
11 | 11 |
12 int access(const char *pathname, int mode) { | 12 int sigprocmask(int how, const sigset_t *set, sigset_t *oldset) { |
13 if (!__libnacl_irt_init_fn(&__libnacl_irt_dev_filename.access, | 13 if (!__libnacl_irt_init_fn(&__libnacl_irt_dev_process.sigprocmask, |
14 __libnacl_irt_dev_filename_init)) { | 14 __libnacl_irt_dev_process_init)) { |
15 return -1; | 15 return -1; |
16 } | 16 } |
17 | 17 |
18 int error = __libnacl_irt_dev_filename.access(pathname, mode); | 18 int error = __libnacl_irt_dev_process.sigprocmask(how, set, oldset); |
19 if (error) { | 19 if (error) { |
20 errno = error; | 20 errno = error; |
21 return -1; | 21 return -1; |
22 } | 22 } |
23 | 23 |
24 return 0; | 24 return 0; |
25 } | 25 } |
OLD | NEW |