Rizin
unix-like reverse engineering framework and cli tools
|
#include <assert.h>
#include <io.h>
#include <stdio.h>
#include <stdlib.h>
#include "uv.h"
#include "internal.h"
#include "handle-inl.h"
Go to the source code of this file.
Macros | |
#define | CHILD_STDIO_SIZE(count) |
#define | CHILD_STDIO_COUNT(buffer) *((unsigned int*) (buffer)) |
#define | CHILD_STDIO_CRT_FLAGS(buffer, fd) *((unsigned char*) (buffer) + sizeof(int) + fd) |
#define | CHILD_STDIO_HANDLE(buffer, fd) |
#define | FOPEN 0x01 |
#define | FEOFLAG 0x02 |
#define | FCRLF 0x04 |
#define | FPIPE 0x08 |
#define | FNOINHERIT 0x10 |
#define | FAPPEND 0x20 |
#define | FDEV 0x40 |
#define | FTEXT 0x80 |
Functions | |
void | uv_disable_stdio_inheritance (void) |
static int | uv__create_stdio_pipe_pair (uv_loop_t *loop, uv_pipe_t *server_pipe, HANDLE *child_pipe_ptr, unsigned int flags) |
static int | uv__duplicate_handle (uv_loop_t *loop, HANDLE handle, HANDLE *dup) |
static int | uv__duplicate_fd (uv_loop_t *loop, int fd, HANDLE *dup) |
int | uv__create_nul_handle (HANDLE *handle_ptr, DWORD access) |
int | uv__stdio_create (uv_loop_t *loop, const uv_process_options_t *options, BYTE **buffer_ptr) |
void | uv__stdio_destroy (BYTE *buffer) |
void | uv__stdio_noinherit (BYTE *buffer) |
int | uv__stdio_verify (BYTE *buffer, WORD size) |
WORD | uv__stdio_size (BYTE *buffer) |
HANDLE | uv__stdio_handle (BYTE *buffer, int fd) |
Definition at line 43 of file process-stdio.c.
Definition at line 46 of file process-stdio.c.
Definition at line 49 of file process-stdio.c.
#define CHILD_STDIO_SIZE | ( | count | ) |
Definition at line 38 of file process-stdio.c.
#define FAPPEND 0x20 |
Definition at line 63 of file process-stdio.c.
#define FCRLF 0x04 |
Definition at line 60 of file process-stdio.c.
#define FDEV 0x40 |
Definition at line 64 of file process-stdio.c.
#define FEOFLAG 0x02 |
Definition at line 59 of file process-stdio.c.
#define FNOINHERIT 0x10 |
Definition at line 62 of file process-stdio.c.
#define FOPEN 0x01 |
Definition at line 58 of file process-stdio.c.
#define FPIPE 0x08 |
Definition at line 61 of file process-stdio.c.
#define FTEXT 0x80 |
Definition at line 65 of file process-stdio.c.
Definition at line 240 of file process-stdio.c.
References access, handle, HANDLE, INVALID_HANDLE_VALUE, L, NULL, and TRUE.
Referenced by uv__stdio_create().
|
static |
Definition at line 98 of file process-stdio.c.
References assert(), DWORD, err, error(), flags, HANDLE, INVALID_HANDLE_VALUE, uv_pipe_s::ipc, loop, NULL, r, TRUE, UV_HANDLE_READABLE, UV_HANDLE_WRITABLE, UV_OVERLAPPED_PIPE, uv_pipe_cleanup(), UV_READABLE_PIPE, uv_stdio_pipe_server(), and UV_WRITABLE_PIPE.
Referenced by uv__stdio_create().
Definition at line 227 of file process-stdio.c.
References dup, fd, handle, HANDLE, INVALID_HANDLE_VALUE, loop, uv__duplicate_handle(), and uv__get_osfhandle().
Referenced by uv__stdio_create().
Definition at line 194 of file process-stdio.c.
References dup, handle, HANDLE, INVALID_HANDLE_VALUE, NULL, and TRUE.
Referenced by uv__duplicate_fd(), and uv__stdio_create().
int uv__stdio_create | ( | uv_loop_t * | loop, |
const uv_process_options_t * | options, | ||
BYTE ** | buffer_ptr | ||
) |
Definition at line 265 of file process-stdio.c.
References access, assert(), CHILD_STDIO_COUNT, CHILD_STDIO_CRT_FLAGS, CHILD_STDIO_HANDLE, CHILD_STDIO_SIZE, count, uv_stdio_container_s::data, DWORD, err, error(), uv_stdio_container_s::fd, FDEV, uv_stdio_container_s::flags, FOPEN, FPIPE, HANDLE, i, INVALID_HANDLE_VALUE, loop, NULL, options, uv_stdio_container_s::stream, uv__create_nul_handle(), uv__create_stdio_pipe_pair(), uv__duplicate_fd(), uv__duplicate_handle(), uv__malloc(), uv__stdio_destroy(), UV_CREATE_PIPE, UV_HANDLE_CONNECTION, UV_HANDLE_PIPESERVER, UV_IGNORE, UV_INHERIT_FD, and UV_INHERIT_STREAM.
Referenced by uv_spawn().
void uv__stdio_destroy | ( | BYTE * | buffer | ) |
Definition at line 453 of file process-stdio.c.
References CHILD_STDIO_COUNT, CHILD_STDIO_HANDLE, count, handle, HANDLE, i, INVALID_HANDLE_VALUE, and uv__free().
Referenced by uv__stdio_create(), and uv_spawn().
Definition at line 510 of file process-stdio.c.
References CHILD_STDIO_HANDLE, and fd.
Referenced by uv_spawn().
void uv__stdio_noinherit | ( | BYTE * | buffer | ) |
Definition at line 468 of file process-stdio.c.
References CHILD_STDIO_COUNT, CHILD_STDIO_HANDLE, count, handle, HANDLE, i, and INVALID_HANDLE_VALUE.
Referenced by uv_disable_stdio_inheritance().
WORD uv__stdio_size | ( | BYTE * | buffer | ) |
Definition at line 505 of file process-stdio.c.
References CHILD_STDIO_COUNT, and CHILD_STDIO_SIZE.
Referenced by uv_spawn().
Definition at line 481 of file process-stdio.c.
References CHILD_STDIO_COUNT, CHILD_STDIO_SIZE, count, and NULL.
Referenced by uv_disable_stdio_inheritance().
void uv_disable_stdio_inheritance | ( | void | ) |
Definition at line 74 of file process-stdio.c.
References fd, handle, HANDLE, INVALID_HANDLE_VALUE, NULL, si, uv__cloexec, uv__stdio_noinherit(), and uv__stdio_verify().