Index: src/untrusted/nacl/getpgid.c |
diff --git a/src/untrusted/nacl/chdir.c b/src/untrusted/nacl/getpgid.c |
similarity index 60% |
copy from src/untrusted/nacl/chdir.c |
copy to src/untrusted/nacl/getpgid.c |
index 2acc4c0aef86e239b0716259309e58622d9cde92..19f6011f7b2dc278a9c0fdfa1d1d0e34f4628e4f 100644 |
--- a/src/untrusted/nacl/chdir.c |
+++ b/src/untrusted/nacl/getpgid.c |
@@ -10,17 +10,18 @@ |
#include "native_client/src/untrusted/nacl/nacl_irt.h" |
-int chdir(const char *path) { |
- if (!__libnacl_irt_init_fn(&__libnacl_irt_dev_filename.chdir, |
- __libnacl_irt_dev_filename_init)) { |
+pid_t getpgid(pid_t pid) { |
+ if (!__libnacl_irt_init_fn(&__libnacl_irt_dev_process.getpgid, |
+ __libnacl_irt_dev_process_init)) { |
return -1; |
} |
- int error = __libnacl_irt_dev_filename.chdir(path); |
+ pid_t pgid; |
+ int error = __libnacl_irt_dev_process.getpgid(pid, &pgid); |
if (error) { |
errno = error; |
return -1; |
} |
- return 0; |
+ return pgid; |
} |