This aligns the behavior with Windows, where users don't need to
call `uv_read_stop` or `uv_close` if they get an error in the read
callback.
PR-URL: https://github.com/libuv/libuv/pull/47
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Add a per-event loop flag for blocking SIGPROF signals when polling for
events.
The motivation for this addition is to reduce the number of wakeups and
subsequent clock_gettime() system calls when using a sampling profiler.
On Linux, this switches from epoll_wait() to epoll_pwait() when enabled.
Other platforms bracket the poll syscall with pthread_sigmask() calls.
Refs strongloop/strong-agent#3 and strongloop-internal/scrum-cs#37.
PR-URL: https://github.com/libuv/libuv/pull/15
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This reverts commit 0f25560c8a.
This change was introduced to make it possible to use the TTY for binary
I/O but unfortunately it breaks libuv users that depend on the OPOST and
ONLCR flags, like node.js.
There is no point in adding those flags after the call to cfmakeraw()
because that would once again make the TTY unsuitable for binary I/O.
Let's revert it for now and revisit it again later.
Fixeslibuv/libuv#32, reverts joyent/libuv#1567.
PR-URL: https://github.com/libuv/libuv/pull/33
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This happens in certain build environments such as Jenkins if
some tweaking is not performed in the host system.
PR-URL: https://github.com/libuv/libuv/pull/22
The get_currentexe test requires a canonicalized argv[0] to check
against. Before this commit, it failed when argv[0] contained symbolic
links.
Fixeslibuv/libuv#18.
Fix various typos and spelling mistakes in comments.
Does not affect any code, just changes comments.
PR-URL: https://github.com/libuv/libuv/pull/17
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Fix various typos and spelling mistakes in the documentation
PR-URL: https://github.com/libuv/libuv/pull/17
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Make sure we initialize it after the handle was removed from the pending
queue so that QUEUE_REMOVE doesn't do an invalid write when the process
is closed.
Valgrind output:
==4362== Invalid write of size 8
==4362== at 0x407DB8: uv__process_close (process.c:515)
==4362== by 0x404F94: uv_close (core.c:138)
==4362== by 0x4037C5: main (invalid_write.c:33)
==4362== Address 0xffeffc820 is not stack'd, malloc'd or (recently) free'd
==4362==
==4362== Invalid write of size 8
==4362== at 0x407DC3: uv__process_close (process.c:515)
==4362== by 0x404F94: uv_close (core.c:138)
==4362== by 0x4037C5: main (invalid_write.c:33)
==4362== Address 0xffeffc828 is not stack'd, malloc'd or (recently) free'd
Refs: joyent/libuv/issues/1584
linux-syscalls.h assumes that on all Linux platforms the value
of O_NONBLOCK is the same as SOCK_NONBLOCK.
This commit fixes it, as it is at least not true for hppa, and
resolves#1442.
Signed-off-by: Luca Bruno <lucab@debian.org>
sizeof(sigset_t) = 128 whereas the kernel expects 8, the size of a long.
It made the system call fail with EINVAL when a non-NULL sigset was
passed in. Fortunately, it's academic because there is just one call
site and it passes in NULL.
Fixeslibuv/libuv#4.
The existing probes, all two of them, cause a great deal of pain for
people trying to build libuv on Linux because of SystemTap's dtrace(1)
utilitity not understanding the -xnolibs flag.
We could hack around that but it's easier to just remove the probes:
they are largely useless and unused while still needing a lot of
supporting infrastructure. This commit removes 200 lines of code
and configuration.
Refs joyent/libuv#1478.
59658a8de7 changed uv_thread_self()
to return uv_thread_t, but uv_thread_t is a thread's HANDLE while
uv_thread_self() returns the current thread's id.
This means that uv_thread_equal() is also broken, as we are
potentially comparing HANDLES to ids.
Changed uv_thread_self() to return the current thread's creation handle.
Fixed small doc issue.
Changes since version 0.10.28:
* darwin: allocate enough space for select() hack (Fedor Indutny)
* linux: try epoll_pwait if epoll_wait is missing (Michael Hudson-Doyle)
* windows: map ERROR_INVALID_DRIVE to UV_ENOENT (Saúl Ibarra Corretgé)
It seems that epoll_wait is implemented in glibc in terms of epoll_pwait and
new architectures (like arm64) do not implement the epoll_wait syscall at all.
So if epoll_wait errors with ENOSYS, just call epoll_pwait.
This is a backport of 861de3d71d for v0.10
branch.
When multiple bufs are specified, overlapped needs to be advanced
manually between each write. Without this, each buf will be written
to the same position (if offset is specified.)
ReadFile() automatically advances, but WriteFile() does not.