Commit Graph

13 Commits

Author SHA1 Message Date
Ben Noordhuis
19d8eb0c92 linux: use statx() to obtain file birth time
Kernels > 4.11 support the statx() system call that lets one retrieve
the birth time of a file. Teach libuv about it.

Fixes: https://github.com/libuv/libuv/issues/2152
PR-URL: https://github.com/libuv/libuv/pull/2184
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2019-02-12 11:16:44 +01:00
Ben Noordhuis
9208df0c93 linux: remove epoll syscall wrappers
Remove the syscalls wrappers now that the minimum requirements are
kernel 2.6.32 + glibc 2.12.

This commit should fix the epoll_pwait()-related issues that have
been reported against mips/mipsel builds.

Fixes: https://github.com/libuv/libuv/issues/335
PR-URL: https://github.com/libuv/libuv/pull/1372
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2018-09-06 13:07:13 +02:00
Jeremiah Senkpiel
fa5c1d9296
unix,fs: remove uv__utimesat() syscall fallback
This is now unnecessary as of the previous commit.

PR-URL: https://github.com/libuv/libuv/pull/1940
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-09-03 14:34:07 +02:00
Saúl Ibarra Corretgé
176fdc7352 linux,fs: fix p{read,write}v with a 64bit offset
According to [0] we need to pass it in 2 32bit registers on some
platforms such as MIPS. Fix inspired by the musl libc implementation [1].

[0]: http://man7.org/linux/man-pages/man2/syscall.2.html#NOTES
[1]: http://git.musl-libc.org/cgit/musl/tree/src/unistd/preadv.c

Fixes: https://github.com/libuv/libuv/issues/473
Refs: https://github.com/libuv/libuv/pull/498
Refs: https://github.com/libuv/libuv/pull/627
PR-URL: https://github.com/libuv/libuv/pull/638
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-12-03 08:50:28 +01:00
Keno Fischer
af0d09bddc linux: intercept syscall when running under memory sanitizer
Since libuv has it's own syscall wrappers, the standard libc interception
mechanism of the sanitizers do not catch these, leading to false positives
for projects using libuv when running under memory sanitizer.

Fix this by adding the appropriate calls to unpoison manually.

PR-URL: https://github.com/libuv/libuv/pull/311
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-05-05 10:26:20 +02:00
Ben Noordhuis
751ac48baa linux: fix epoll_pwait() sigmask size calculation
Revisit the fix from commit b705b53.  The problem with using sigset_t
and _NSIG is that the size of sigset_t and the value of _NSIG depend
on what headers libuv picks up first, <signal.h> or <asm/signal.h>.
With the former, sizeof(sigset_t) = 128; with the latter, it's 8.

Simply sidestep the issue by calculating the signal mask as a 64 bits
integer, without using sigset_t or _NSIG.

PR-URL: https://github.com/libuv/libuv/pull/83
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2014-12-25 14:37:02 +01:00
Ben Noordhuis
a6f2a4f834 Merge branch 'v0.10' into v1.x
Conflicts:
	AUTHORS
	ChangeLog
	README.md
	config-unix.mk
	include/uv.h
	src/unix/internal.h
	src/unix/kqueue.c
	src/unix/linux-core.c
	src/unix/stream.c
	src/uv-common.c
	src/uv-common.h
	src/version.c
	test/test-osx-select.c
2014-12-05 19:18:36 +01:00
Ben Noordhuis
b705b53edd linux: fix sigmask size arg in epoll_pwait() call
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.

Fixes libuv/libuv#4.
2014-11-25 02:00:51 +01:00
Saúl Ibarra Corretgé
b197515367 unix: reopen tty as /dev/tty
Reopen the file descriptor when it refers to a tty. This lets us put the
tty in non-blocking mode without affecting other processes that share it
with us.

This brings back commit 31f9fbc, which was reverted in 20bb1bf. The OSX
select trick is working now.

Original patch by @bnoordhuis
2014-03-10 19:37:29 +01:00
Benjamin Saunders
13dd3502a7 fs: vectored IO API for filesystem read/write
This improves API consistency with uv_read and uv_write and may
improve efficiency for some uses. Vectored IO is emulated when the
requisite system calls are unavailable.
2014-02-23 17:24:05 +01:00
Fedor Indutny
a03ea239db Revert "fs: vectored IO API for filesystem read/write"
This reverts commit 7df24583e5.
2014-02-18 21:48:13 +04:00
Benjamin Saunders
7df24583e5 fs: vectored IO API for filesystem read/write
This improves API consistency with uv_read and uv_write and may
improve efficiency for some uses. Vectored IO is emulated when the
requisite system calls are unavailable.
2014-02-18 12:30:20 +04:00
Ben Noordhuis
b607a7fed7 linux: move files out of src/unix/linux
Flattens the source tree and simplifies the Makefile.
2013-01-29 17:07:41 +01:00