| Index: src/untrusted/irt/irt_dev.h
|
| diff --git a/src/untrusted/irt/irt_dev.h b/src/untrusted/irt/irt_dev.h
|
| index 22ec0e1e16f288ff941fd1de3f3ea5e8f5750ce6..055bf265ca65d6d432b150f7927d88521602f184 100644
|
| --- a/src/untrusted/irt/irt_dev.h
|
| +++ b/src/untrusted/irt/irt_dev.h
|
| @@ -16,11 +16,30 @@ struct timeval;
|
|
|
| struct NaClMemMappingInfo;
|
|
|
| +#include <spawn.h>
|
| +
|
| #if defined(__cplusplus)
|
| extern "C" {
|
| #endif
|
|
|
| #define NACL_IRT_DEV_FDIO_v0_2 "nacl-irt-dev-fdio-0.2"
|
| +struct nacl_irt_dev_fdio_v0_2 {
|
| + int (*close)(int fd);
|
| + int (*dup)(int fd, int *newfd);
|
| + int (*dup2)(int fd, int newfd);
|
| + int (*read)(int fd, void *buf, size_t count, size_t *nread);
|
| + int (*write)(int fd, const void *buf, size_t count, size_t *nwrote);
|
| + int (*seek)(int fd, off_t offset, int whence, off_t *new_offset);
|
| + int (*fstat)(int fd, struct stat *);
|
| + int (*getdents)(int fd, struct dirent *, size_t count, size_t *nread);
|
| + int (*fchdir)(int fd);
|
| + int (*fchmod)(int fd, mode_t mode);
|
| + int (*fsync)(int fd);
|
| + int (*fdatasync)(int fd);
|
| + int (*ftruncate)(int fd, off_t length);
|
| +};
|
| +
|
| +#define NACL_IRT_DEV_FDIO_v0_3 "nacl-irt-dev-fdio-0.3"
|
| struct nacl_irt_dev_fdio {
|
| int (*close)(int fd);
|
| int (*dup)(int fd, int *newfd);
|
| @@ -35,6 +54,7 @@ struct nacl_irt_dev_fdio {
|
| int (*fsync)(int fd);
|
| int (*fdatasync)(int fd);
|
| int (*ftruncate)(int fd, off_t length);
|
| + int (*pipe)(int pipefd[2]);
|
| };
|
|
|
| /*
|
| @@ -81,6 +101,25 @@ struct nacl_irt_dev_list_mappings {
|
| size_t count, size_t *result_count);
|
| };
|
|
|
| +#define NACL_IRT_DEV_PROCESS_v0_1 "nacl-irt-dev-process-0.1"
|
| +struct nacl_irt_dev_process {
|
| + int (*getpid)(pid_t *pid);
|
| + int (*getppid)(pid_t *ppid);
|
| + int (*setpgid)(pid_t pid, pid_t pgid);
|
| + int (*getpgid)(pid_t pid, pid_t *pgid);
|
| + int (*setsid)(pid_t *sid);
|
| + int (*getsid)(pid_t pid, pid_t *sid);
|
| + int (*kill)(pid_t pid, int sig);
|
| + int (*posix_spawn)(pid_t *pid, const char *path,
|
| + const posix_spawn_file_actions_t *file_actions,
|
| + const posix_spawnattr_t *attrp,
|
| + char *const argv[], char *const envp[]);
|
| + int (*signal)(int sig, sighandler_t handler, sighandler_t *oldhandler);
|
| + int (*sigprocmask)(int how, const sigset_t *set, sigset_t *oldset);
|
| + int (*wait)(int *pid, int *status);
|
| + int (*waitpid)(int *pid, int *status, int options);
|
| +};
|
| +
|
| #if defined(__cplusplus)
|
| }
|
| #endif
|
|
|