Home
last modified time | relevance | path

Searched refs:pipe (Results 1 – 25 of 40) sorted by relevance

12

/libuv/test/
H A Dtest-getters-setters.c60 uv_pipe_t* pipe; in TEST_IMPL() local
73 pipe = malloc(uv_handle_size(UV_NAMED_PIPE)); in TEST_IMPL()
74 r = uv_pipe_init(loop, pipe, 0); in TEST_IMPL()
78 ASSERT_PTR_EQ(uv_handle_get_loop((uv_handle_t*)pipe), loop); in TEST_IMPL()
79 pipe->data = &cookie2; in TEST_IMPL()
81 uv_handle_set_data((uv_handle_t*)pipe, &cookie1); in TEST_IMPL()
83 ASSERT_PTR_EQ(pipe->data, &cookie1); in TEST_IMPL()
86 pipe->write_queue_size++; in TEST_IMPL()
88 pipe->write_queue_size--; in TEST_IMPL()
89 uv_close((uv_handle_t*)pipe, NULL); in TEST_IMPL()
[all …]
H A Dtest-ipc-send-recv.c38 uv_pipe_t pipe; member
92 uv_pipe_t* pipe; in recv_cb() local
98 pipe = (uv_pipe_t*) handle; in recv_cb()
99 ASSERT_PTR_EQ(pipe, &ctx.channel); in recv_cb()
120 pending = uv_pipe_pending_type(pipe); in recv_cb()
134 } while (uv_pipe_pending_count(pipe) > 0); in recv_cb()
305 uv_pipe_t* pipe; in read_cb() local
319 pipe = (uv_pipe_t*) handle; in read_cb()
320 ASSERT_PTR_EQ(pipe, &ctx2.channel); in read_cb()
322 while (uv_pipe_pending_count(pipe) > 0) { in read_cb()
[all …]
H A Dtest-ipc-heavy-traffic-deadlock-bug.c134 uv_pipe_t pipe; in TEST_IMPL() local
137 spawn_helper(&pipe, &process, "ipc_helper_heavy_traffic_deadlock_bug"); in TEST_IMPL()
138 do_writes_and_reads((uv_stream_t*) &pipe); in TEST_IMPL()
140 MAKE_VALGRIND_HAPPY(pipe.loop); in TEST_IMPL()
145 uv_pipe_t pipe; in ipc_helper_heavy_traffic_deadlock_bug() local
148 r = uv_pipe_init(uv_default_loop(), &pipe, 1); in ipc_helper_heavy_traffic_deadlock_bug()
150 r = uv_pipe_open(&pipe, 0); in ipc_helper_heavy_traffic_deadlock_bug()
154 do_writes_and_reads((uv_stream_t*) &pipe); in ipc_helper_heavy_traffic_deadlock_bug()
H A Drunner-unix.c123 if (pipe(pipefd)) { in process_start()
194 int pipe[2]; member
220 if (args->pipe[1] >= 0) { in dowait()
225 r = write(args->pipe[1], "", 1); in dowait()
251 args.pipe[0] = -1; in process_wait()
252 args.pipe[1] = -1; in process_wait()
266 r = pipe((int*)&(args.pipe)); in process_wait()
315 FD_SET(args.pipe[0], &fds); in process_wait()
317 r = select(args.pipe[0] + 1, &fds, NULL, NULL, &tv); in process_wait()
346 closefd(args.pipe[0]); in process_wait()
[all …]
H A Dtest-handle-fileno.c53 uv_pipe_t pipe; in TEST_IMPL() local
91 r = uv_pipe_init(loop, &pipe, 0); in TEST_IMPL()
93 r = uv_fileno((uv_handle_t*) &pipe, &fd); in TEST_IMPL()
95 r = uv_pipe_bind(&pipe, TEST_PIPENAME); in TEST_IMPL()
97 r = uv_fileno((uv_handle_t*) &pipe, &fd); in TEST_IMPL()
99 uv_close((uv_handle_t*) &pipe, NULL); in TEST_IMPL()
100 r = uv_fileno((uv_handle_t*) &pipe, &fd); in TEST_IMPL()
H A Dtest-pipe-bind-error.c167 uv_pipe_t pipe; in TEST_IMPL() local
170 ASSERT_OK(uv_pipe_init(uv_default_loop(), &pipe, 0)); in TEST_IMPL()
187 uv_pipe_bind2(&pipe, path, sizeof(path), UV_PIPE_NO_TRUNCATE)); in TEST_IMPL()
194 uv_pipe_bind2(&pipe, path, sizeof(path), UV_PIPE_NO_TRUNCATE)); in TEST_IMPL()
197 &pipe, in TEST_IMPL()
206 &pipe, in TEST_IMPL()
H A Dtest-ipc.c147 uv_pipe_t* pipe; in on_read() local
151 pipe = (uv_pipe_t*) handle; in on_read()
171 pending = uv_pipe_pending_type(pipe); in on_read()
203 ASSERT_OK(uv_pipe_pending_count(pipe)); in on_read()
217 uv_pipe_t* pipe; in on_read_listen_after_bound_twice() local
220 pipe = (uv_pipe_t*) handle; in on_read_listen_after_bound_twice()
241 pending = uv_pipe_pending_type(pipe); in on_read_listen_after_bound_twice()
272 ASSERT_OK(uv_pipe_pending_count(pipe)); in on_read_listen_after_bound_twice()
355 uv_pipe_t* pipe; in on_read_connection() local
358 pipe = (uv_pipe_t*) handle; in on_read_connection()
[all …]
H A Dtest-ping-pong.c48 uv_pipe_t pipe; member
290 r = uv_pipe_init(uv_default_loop(), &pinger->stream.pipe, 0); in pipe_pinger_new()
291 pinger->stream.pipe.data = pinger; in pipe_pinger_new()
296 uv_pipe_connect(&pinger->connect_req, &pinger->stream.pipe, TEST_PIPENAME, in pipe_pinger_new()
326 pinger->stream.pipe.data = pinger; in socketpair_pinger_new()
367 ASSERT_OK(uv_pipe_init(uv_default_loop(), &pinger->stream.pipe, 0)); in pipe2_pinger_new()
368 ASSERT_OK(uv_pipe_open(&pinger->stream.pipe, fds[1])); in pipe2_pinger_new()
369 pinger->stream.pipe.data = pinger; /* record for close_cb */ in pipe2_pinger_new()
H A Dbenchmark-spawn.c84 static void pipe_close_cb(uv_handle_t* pipe) { in pipe_close_cb() argument
91 static void on_read(uv_stream_t* pipe, ssize_t nread, const uv_buf_t* buf) { in on_read() argument
97 uv_close((uv_handle_t*)pipe, pipe_close_cb); in on_read()
H A Dtest-iouring-pollhup.c94 ASSERT_OK(pipe(pipefds)); in TEST_IMPL()
95 ASSERT_OK(pipe(newpipefds)); in TEST_IMPL()
H A Dbenchmark-pump.c247 uv_pipe_t* pipe; in maybe_connect_some() local
265 pipe = &pipe_write_handles[max_connect_socket++]; in maybe_connect_some()
267 r = uv_pipe_init(loop, pipe, 0); in maybe_connect_some()
271 uv_pipe_connect(req, pipe, TEST_PIPENAME, connect_cb); in maybe_connect_some()
H A Dtest-stdio-over-pipes.c97 static void on_read(uv_stream_t* pipe, ssize_t nread, const uv_buf_t* rdbuf) { in on_read() argument
181 static void on_pipe_read(uv_stream_t* pipe, ssize_t nread, const uv_buf_t* buf) { in on_pipe_read() argument
188 uv_read_stop(pipe); in on_pipe_read()
H A Dtest-fork.c179 ASSERT_OK(pipe(sync_pipe)); in TEST_IMPL()
256 ASSERT_OK(pipe(sync_pipe)); in TEST_IMPL()
313 ASSERT_OK(pipe(sync_pipe)); in TEST_IMPL()
314 ASSERT_OK(pipe(sync_pipe2)); in TEST_IMPL()
H A Dtest-pipe-close-stdout-read-stdin.c63 r = pipe(fd); in TEST_IMPL()
H A Dtest-eintr-handling.c76 ASSERT_OK(pipe(pipe_fds)); in TEST_IMPL()
H A Dtest-signal-pending-on-close.c71 ASSERT_OK(pipe(pipefds)); in TEST_IMPL()
/libuv/src/win/
H A Dpipe.c198 assert(pipe->u.fd == -1 || pipe->u.fd > 2); in close_pipe()
2339 assert(pipe->pipe.conn.eof_timer == NULL); in eof_timer_init()
2342 pipe->pipe.conn.eof_timer = (uv_timer_t*) uv__malloc(sizeof *pipe->pipe.conn.eof_timer); in eof_timer_init()
2344 r = uv_timer_init(pipe->loop, pipe->pipe.conn.eof_timer); in eof_timer_init()
2347 pipe->pipe.conn.eof_timer->data = pipe; in eof_timer_init()
2348 uv_unref((uv_handle_t*) pipe->pipe.conn.eof_timer); in eof_timer_init()
2355 if (pipe->pipe.conn.eof_timer != NULL) { in eof_timer_start()
2364 if (pipe->pipe.conn.eof_timer != NULL) { in eof_timer_stop()
2365 uv_timer_stop(pipe->pipe.conn.eof_timer); in eof_timer_stop()
2407 if (pipe->pipe.conn.eof_timer) { in eof_timer_destroy()
[all …]
/libuv/docs/src/
H A Dpipe.rst28 set, not the listening pipe that uv_accept is called on.
46 Open an existing file descriptor or HANDLE as a pipe.
52 it's required that it represents a valid pipe.
56 Bind the pipe to a file path (Unix) or a name (Windows).
69 Bind the pipe to a file path (Unix) or a name (Windows).
86 Connect to the Unix domain socket or the Windows named pipe.
99 Connect to the Unix domain socket or the Windows named pipe.
116 Get the name of the Unix domain socket or the named pipe.
140 Set the number of pending pipe instance handles when the pipe server is
153 and call ``uv_accept(pipe, handle)``.
[all …]
H A Dapi.rst24 pipe
/libuv/docs/code/multi-echo-server/
H A Dmain.c12 uv_pipe_t pipe; member
43 … uv_write2(write_req, (uv_stream_t*) &worker->pipe, &dummy_buf, 1, (uv_stream_t*) client, NULL); in on_new_connection()
76 uv_pipe_init(loop, &worker->pipe, 1); in setup_workers()
80 child_stdio[0].data.stream = (uv_stream_t*) &worker->pipe; in setup_workers()
H A Dworker.c59 uv_pipe_t *pipe = (uv_pipe_t*) q; in on_new_connection() local
60 if (!uv_pipe_pending_count(pipe)) { in on_new_connection()
65 uv_handle_type pending = uv_pipe_pending_type(pipe); in on_new_connection()
/libuv/
H A DMakefile.am77 src/win/pipe.c \
108 src/unix/pipe.c \
223 test/test-pipe-bind-error.c \
224 test/test-pipe-connect-error.c \
225 test/test-pipe-connect-multiple.c \
226 test/test-pipe-connect-prepare.c \
227 test/test-pipe-getsockname.c \
229 test/test-pipe-sendmsg.c \
230 test/test-pipe-server-close.c \
232 test/test-pipe-set-non-blocking.c \
[all …]
H A DCMakeLists.txt212 src/win/pipe.c
245 src/unix/pipe.c
596 test/test-pipe-bind-error.c
598 test/test-pipe-connect-error.c
599 test/test-pipe-connect-multiple.c
600 test/test-pipe-connect-prepare.c
601 test/test-pipe-getsockname.c
603 test/test-pipe-sendmsg.c
604 test/test-pipe-server-close.c
605 test/test-pipe-set-fchmod.c
[all …]
/libuv/docs/src/guide/
H A Dprocesses.rst271 The ``uv_pipe_t`` structure represents more than just `pipe(7)`_ (or ``|``),
275 `pipe(7)`_. When ``uv_spawn`` initializes a ``uv_pipe_t`` due to the
281 .. _pipe(7): https://man7.org/linux/man-pages/man7/pipe.7.html
304 .. rubric:: pipe-echo-server/main.c
305 .. literalinclude:: ../../code/pipe-echo-server/main.c
323 ``\\?\pipe\echo.sock`` format.
353 argument of ``uv_pipe_init`` to 1 to indicate this pipe will be used for
355 standard input of the worker, we connect the pipe to ``stdin`` using
383 The ``child_worker`` structure wraps the process, and the pipe between the
395 important to initialize the pipe acting as the IPC channel with the third
[all …]
/libuv/docs/code/
H A DCMakeLists.txt20 pipe-echo-server

Completed in 42 milliseconds

12