Rizin
unix-like reverse engineering framework and cli tools
|
#include "uv.h"
#include "internal.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <fcntl.h>
#include <poll.h>
Go to the source code of this file.
Functions | |
static void | uv__chld (uv_signal_t *handle, int signum) |
static int | uv__make_socketpair (int fds[2]) |
int | uv__make_pipe (int fds[2], int flags) |
static int | uv__process_init_stdio (uv_stdio_container_t *container, int fds[2]) |
static int | uv__process_open_stream (uv_stdio_container_t *container, int pipefds[2]) |
static void | uv__process_close_stream (uv_stdio_container_t *container) |
static void | uv__write_int (int fd, int val) |
static void | uv__process_child_init (const uv_process_options_t *options, int stdio_count, int(*pipes)[2], int error_fd) |
int | uv_spawn (uv_loop_t *loop, uv_process_t *process, const uv_process_options_t *options) |
int | uv_process_kill (uv_process_t *process, int signum) |
int | uv_kill (int pid, int signum) |
void | uv__process_close (uv_process_t *handle) |
Variables | |
char ** | environ |
|
static |
Definition at line 48 of file process.c.
References assert(), ECHILD, EINTR, exit_status, h, handle, loop, NULL, pid, process(), queue, QUEUE_DATA, QUEUE_EMPTY, QUEUE_HEAD, QUEUE_INIT, QUEUE_INSERT_TAIL, QUEUE_NEXT, QUEUE_REMOVE, signum, status, and uv__handle_stop.
Referenced by uv_spawn().
Definition at line 142 of file process.c.
References fail, flags, O_CLOEXEC, pipe, uv__cloexec, uv__close(), UV__ERR, UV__F_NONBLOCK, and uv__nonblock.
Referenced by uv__async_start(), uv__signal_global_reinit(), uv__signal_loop_once_init(), and uv_spawn().
Definition at line 115 of file process.c.
References AF_UNIX, err, SOCK_STREAM, uv__cloexec, uv__close(), and UV__ERR.
Referenced by uv__process_init_stdio().
|
static |
Definition at line 267 of file process.c.
References chdir, dup2, environ, err, F_DUPFD, fcntl, fd, n, NULL, O_RDONLY, O_RDWR, options, SAVE_ERRNO, setgid, setgroups, SIGKILL, signal, uv__cloexec_fcntl(), uv__close(), UV__ERR, uv__nonblock_fcntl(), uv__write_int(), UV_PROCESS_DETACHED, UV_PROCESS_SETGID, and UV_PROCESS_SETUID.
Referenced by uv_spawn().
void uv__process_close | ( | uv_process_t * | handle | ) |
Definition at line 590 of file process.c.
References handle, QUEUE_EMPTY, QUEUE_REMOVE, uv__handle_stop, and uv_signal_stop().
Referenced by uv_close().
|
static |
Definition at line 242 of file process.c.
References uv_stdio_container_s::data, uv_stdio_container_s::flags, uv_stdio_container_s::stream, uv__stream_close(), and UV_CREATE_PIPE.
Referenced by uv_spawn().
|
static |
Definition at line 180 of file process.c.
References assert(), uv_stdio_container_s::data, fd, uv_stdio_container_s::fd, uv_stdio_container_s::flags, mask, NULL, uv_stdio_container_s::stream, uv__make_socketpair(), uv__stream_fd, UV_CREATE_PIPE, UV_IGNORE, UV_INHERIT_FD, and UV_INHERIT_STREAM.
Referenced by uv_spawn().
|
static |
Definition at line 217 of file process.c.
References uv_stdio_container_s::data, err, flags, uv_stdio_container_s::flags, uv_stdio_container_s::stream, uv__close(), uv__nonblock, uv__stream_open(), UV_CREATE_PIPE, UV_HANDLE_READABLE, UV_HANDLE_WRITABLE, UV_READABLE_PIPE, and UV_WRITABLE_PIPE.
Referenced by uv_spawn().
Definition at line 582 of file process.c.
Referenced by uv_process_kill().
int uv_process_kill | ( | uv_process_t * | process, |
int | signum | ||
) |
int uv_spawn | ( | uv_loop_t * | loop, |
uv_process_t * | process, | ||
const uv_process_options_t * | options | ||
) |
Definition at line 408 of file process.c.
|
extern |
Referenced by uv__process_child_init().