Rizin
unix-like reverse engineering framework and cli tools
|
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <uv.h>
Go to the source code of this file.
Classes | |
struct | write_req_t |
Functions | |
void | alloc_buffer (uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf) |
void | free_write_req (uv_write_t *req) |
void | on_stdout_write (uv_write_t *req, int status) |
void | on_file_write (uv_write_t *req, int status) |
void | write_data (uv_stream_t *dest, size_t size, uv_buf_t buf, uv_write_cb cb) |
void | read_stdin (uv_stream_t *stream, ssize_t nread, const uv_buf_t *buf) |
int | main (int argc, char **argv) |
Variables | |
uv_loop_t * | loop |
uv_pipe_t | stdin_pipe |
uv_pipe_t | stdout_pipe |
uv_pipe_t | file_pipe |
void alloc_buffer | ( | uv_handle_t * | handle, |
size_t | suggested_size, | ||
uv_buf_t * | buf | ||
) |
void free_write_req | ( | uv_write_t * | req | ) |
Definition at line 23 of file main.c.
References uv_buf_t::base, write_req_t::buf, free(), and req.
Definition at line 62 of file main.c.
References alloc_buffer(), argv, fd, file_pipe, loop, NULL, O_CREAT, O_RDWR, read_stdin(), stdin_pipe, stdout_pipe, uv_default_loop(), uv_fs_open(), uv_pipe_init(), uv_pipe_open(), uv_read_start(), uv_run(), and UV_RUN_DEFAULT.
void on_file_write | ( | uv_write_t * | req, |
int | status | ||
) |
Definition at line 33 of file main.c.
References free_write_req(), and req.
Referenced by read_stdin().
void on_stdout_write | ( | uv_write_t * | req, |
int | status | ||
) |
Definition at line 29 of file main.c.
References free_write_req(), and req.
Referenced by read_stdin().
void read_stdin | ( | uv_stream_t * | stream, |
ssize_t | nread, | ||
const uv_buf_t * | buf | ||
) |
Definition at line 44 of file main.c.
References file_pipe, free(), NULL, on_file_write(), on_stdout_write(), stdin_pipe, stdout_pipe, uv_close(), and write_data().
Referenced by main().
void write_data | ( | uv_stream_t * | dest, |
size_t | size, | ||
uv_buf_t | buf, | ||
uv_write_cb | cb | ||
) |
Definition at line 37 of file main.c.
References cb, dest, malloc(), memcpy(), req, uv_buf_init(), and uv_write().
Referenced by read_stdin().
uv_pipe_t file_pipe |
Definition at line 17 of file main.c.
Referenced by main(), and read_stdin().
uv_pipe_t stdin_pipe |
Definition at line 15 of file main.c.
Referenced by main(), read_stdin(), rz_subprocess_start_opt(), rz_sys_cmd_str_full(), and system_exec_stdin().
uv_pipe_t stdout_pipe |
Definition at line 16 of file main.c.
Referenced by main(), read_stdin(), rz_subprocess_start_opt(), rz_sys_cmd_str_full(), and system_exec_stdin().