The req->addrinfow field contains the hints in that case, so we must not
free it.
This regression was introduced in f2bb8d3 by yours truly.
PR-URL: https://github.com/libuv/libuv/pull/171
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Linux before kernel 2.6.19 does not support epoll_pwait(). Due to a
logic error in commit 2daf944 ("unix: add flag for blocking SIGPROF
during poll"), the fallback path for ENOSYS was not taken.
This commit also adds epoll_pwait() emulation using pthread_sigmask().
The block/unblock operations are not atomic but that is fine for our
particular use case, to wit, sleep through SIGPROF signals.
This is a back-port of commit 67bb2b5 from the v1.x branch.
Original-PR-URL: https://github.com/libuv/libuv/pull/162
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
PR-URL: https://github.com/libuv/libuv/pull/165
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Fixes a number of -Wimplicit-function-declaration warnings for functions
that are behind _GNU_SOURCE on old systems, like strndup() and pread().
PR-URL: https://github.com/libuv/libuv/pull/162
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Linux before kernel 2.6.19 does not support epoll_pwait(). Due to a
logic error in commit 2daf944 ("unix: add flag for blocking SIGPROF
during poll"), the fallback path for ENOSYS was not taken.
This commit also adds epoll_pwait() emulation using pthread_sigmask().
The block/unblock operations are not atomic but that is fine for our
particular use case, to wit, sleep through SIGPROF signals.
PR-URL: https://github.com/libuv/libuv/pull/162
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Indicate that it can (and should) also be closed, currently it's not
"special" in any way.
PR-URL: https://github.com/libuv/libuv/pull/147
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
libuv requires that the socket/fd is in non-blocking mode, so do it
internally so the user doesn't need to write platform specific code to
do so.
This also makes the API consistent with uv_{tcp,udp,pipe}_open, since
it's not required to pass the fd in non-blocking mode there either.
PR-URL: https://github.com/libuv/libuv/pull/136
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Changes since version 1.2.0:
* unix: remove unused dtrace file (Saúl Ibarra Corretgé)
* test: skip TTY select test if /dev/tty can't be opened (Saúl Ibarra
Corretgé)
* doc: clarify the behavior of uv_tty_init (Saúl Ibarra Corretgé)
* doc: clarify how uv_async_send behaves (Saúl Ibarra Corretgé)
* build: make dist now generates a full tarball (Johan Bergström)
* freebsd: make uv_exepath more resilient (Saúl Ibarra Corretgé)
* unix: make setting the tty mode to the same value a no-op (Saúl Ibarra
Corretgé)
* win,tcp: support uv_try_write (Bert Belder)
* test: enable test-tcp-try-write on windows (Bert Belder)
* win,tty: support uv_try_write (Bert Belder)
* unix: set non-block mode in uv_{pipe,tcp,udp}_open (Ben Noordhuis)
The contract specifies that the file descriptor should already be in
non-blocking mode before passing it to libuv.
However, node users don't really have an opportunity to do so, never
mind the fact that the call to uv_pipe_open() or uv_tcp_open() is an
implementation detail that most users won't be aware of.
Let's be nice and set the non-blocking flag explicitly. It's a cheap
operation anyway.
Fixes: https://github.com/libuv/libuv/issues/124
PR: https://github.com/libuv/libuv/pull/134
Reviewed-by: Saúl Ibarra Corretgé <saghul@gmail.com>
The mode argument is an enum now and the signedness of an enum is
implementation-defined when it doesn't have negative members.
Cast it to int in the comparison to tty->mode because the latter is
still an int.
PR: https://github.com/libuv/libuv/pull/134
Reviewed-by: Saúl Ibarra Corretgé <saghul@gmail.com>
All windows console writes are synchronous anyway, so there's no reason
for uv_try_write() to do nothing.
PR: https://github.com/libuv/libuv/pull/127
Reviewed-by: Saúl Ibarra Corretgé <saghul@gmail.com>
Autotools tries to figure out what's necessary to create a tarball through
included files in Makefile.am. Since libuv has conditionals based on target OS
as well as additional samples/documentation, extra_files needs to include these.
Also, add the result of make dist to gitignore.
PR-URL: https://github.com/libuv/libuv/pull/118
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Move compile-time flags that are not platform-specific defines to
configure.ac where they can be properly feature-detected.
PR-URL: https://github.com/libuv/libuv/pull/24
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Don't check if -Wno-dollar-in-identifier-extension is supported in the
autotools build; that flag was only necessary on OS X and only when the
dtrace probes were enabled (because dtrace(1) generates identifiers with
sigils in them). The probes were removed in commit cb51400, making the
check unnecessary.
PR-URL: https://github.com/libuv/libuv/pull/24
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Turn on -Wall -Wextra -Wno-unused-parameter, just like we do in gyp
builds.
PR-URL: https://github.com/libuv/libuv/pull/24
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
It should fix the following build error with old autoconf/automake
versions:
Makefile.am:24: Libtool library used but `LIBTOOL' is undefined
Makefile.am:24: The usual way to define `LIBTOOL' is to add
`AC_PROG_LIBTOOL'
Makefile.am:24: to `configure.ac' and run `aclocal' and `autoconf'
again.
Fixes: https://github.com/libuv/libuv/issues/111
PR-URL: https://github.com/libuv/libuv/pull/113
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
The serial-tests option is available in automake v1.12, not v0.12.
PR-URL: https://github.com/libuv/libuv/pull/113
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>