Commit Graph

2 Commits

Author SHA1 Message Date
Brad King
580f032737 cygwin: disable non-functional ipc handle send
On Cygwin `recvmsg` always sets `msg_controllen` to zero on a
message received from a named pipe.  Therefore we cannot use
`sendmsg` to send handles for ipc.  Return failure early from
this code path as `ENOSYS`.

Skip tests requiring this feature since it is not available.

PR-URL: https://github.com/libuv/libuv/pull/1312
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-21 16:12:28 +02:00
Fedor Indutny
b05a3ee4d1 pipe: allow queueing pending handles
Introduce `int uv_pipe_pending_count(uv_pipe_t*)` and
`uv_handle_type uv_pipe_pending_type(uv_pipe_t*)`. They should be
used in IPC pipe's read cb to accept incoming handles:

    int count = uv_pipe_pending_count(pipe);
    int i;
    for (i = 0; i < count; i++) {
      uv_handle_type type = uv_pipe_pending_type(pipe);
      /* ... */
      uv_accept(...);
    }
2014-03-04 00:34:29 +04:00