Commit Graph

2737 Commits

Author SHA1 Message Date
Timothy J Fontaine
cd0c19b1d3 2014.03.11, Version 0.11.22 (Unstable)
Changes since version 0.11.21:

* unix, windows: map ERANGE errno (Saúl Ibarra Corretgé)

* unix, windows: make uv_cwd be consistent with uv_exepath (Saúl Ibarra
  Corretgé)

* process: remove debug perror() prints (Fedor Indutny)

* windows: fall back for volume info query (Isaiah Norton)

* pipe: allow queueing pending handles (Fedor Indutny)

* windows: fix winsock status codes for address errors (Raul Martins)

* windows: Remove unused variable from uv__pipe_insert_pending_socket
  (David Capello)

* unix: workaround broken pthread_sigmask on Android (Paul Tan)

* error: add ENXIO for O_NONBLOCK FIFO open() (Fedor Indutny)

* freebsd: use accept4, introduced in version 10 (Saúl Ibarra Corretgé)

* windows: fix warnings of MinGW -Wall -O3 (StarWing)

* openbsd, osx: fix compilation warning on scandir (Saúl Ibarra
  Corretgé)

* linux: always deregister closing fds from epoll (Geoffry Song)

* unix: reopen tty as /dev/tty (Saúl Ibarra Corretgé)

* kqueue: invalidate fd in uv_fs_event_t (Fedor Indutny)
2014-03-10 16:54:33 -07:00
Fedor Indutny
118a0a3c9b Merge branch 'v0.10'
Conflicts:
	test/test-spawn.c
2014-03-11 02:59:48 +04:00
Fedor Indutny
9b38c01b54 kqueue: invalidate fd in uv_fs_event_t
Invalidate file descriptor when closing `uv_fs_event_t` handle. Note
that `uv__io_stop` is just removing `fd` from `loop->watchers` and not
actually invalidating all consequent events in a `kevent()` results.

fix joyent/node#1101
2014-03-11 02:44:13 +04: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
Geoffry Song
84f305915f linux: always deregister closing fds from epoll
If the same file description is open in two different processes, then
closing the file descriptor is not sufficient to deregister it from the
epoll instance (as described in epoll(7)), resulting in spurious events
that cause the event loop to spin repeatedly. So always explicitly
deregister it.

Fixes #1099.

Conflicts:
	test/test-spawn.c
2014-03-10 17:27:36 +04:00
Saúl Ibarra Corretgé
daa457b1c0 openbsd, osx: fix compilation warning on scandir
The select function takes a const struct on newer OSX versions but it
doesn't on OSX <= 10.7 or OpenBSD.
2014-03-10 09:07:44 +01:00
StarWing
1ec4c23438 windows: fix warnings of MinGW -Wall -O3 2014-03-07 17:21:00 +08:00
Saúl Ibarra Corretgé
e525b89b03 build: allow CC to be overridden on Makefile.mingw 2014-03-07 09:49:39 +01:00
Saúl Ibarra Corretgé
1fbecefa70 build: remove unneeded EXTRA_CFLAGS from Makefile.mingw 2014-03-07 09:39:42 +01:00
Saúl Ibarra Corretgé
4c47fcd787 freebsd: use accept4, introduced in version 10 2014-03-06 17:57:13 +01:00
Fedor Indutny
9aa48312bc Merge remote-tracking branch 'origin/v0.10'
Conflicts:
	AUTHORS
	ChangeLog
	include/uv.h
	src/unix/error.c
	src/unix/process.c
	src/version.c
2014-03-06 20:45:15 +04:00
Fedor Indutny
4f72f2145b error: add ENXIO for O_NONBLOCK FIFO open()
When opening FIFO with `O_NONBLOCK` flag, `ENXIO` could be returned if
the readable side hasn't yet opened this FIFO.
2014-03-06 20:36:07 +04:00
Paul Tan
347000929d unix: workaround broken pthread_sigmask on Android
On android, if a call to `pthread_sigmask` fails with EINVAL, fallback
to `sigprocmask`. This workarounds the broken behaviour of
`pthread_sigmask` on Android versions < 4.1. See:

* https://android.googlesource.com/platform/bionic/+/9bf330b5
* https://code.google.com/p/android/issues/detail?id=15337

This is implemented by replacing all calls of `pthread_sigmask` to a new
function `uv__pthread_sigmask` which implements this fallback mechanism.
2014-03-06 11:54:50 +01:00
David Capello
97fc348716 windows: Remove unused variable from uv__pipe_insert_pending_socket 2014-03-05 20:06:04 -03:00
Raul Martins
f326820f55 windows: fix winsock status codes for address errors
- STATUS_TOO_MANY_ADDRESSES now returns WSAEADDRINUSE
- STATUS_CONFLICTING_ADDRESSES now returns WSAEADDRNOTAVAIL
2014-03-03 21:51:52 +01:00
Saúl Ibarra Corretgé
0e59136823 test: fix compiation warning
-Wunused-function would kick in because of the close_loop function,
but there tests and benchmarks which actually don't use any loop.
2014-03-03 21:49:34 +01: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
Isaiah Norton
2930d04e5b windows: fall back for volume info query
Wine does not currently support FileFsVolumeInformation:

https://github.com/mirrors/wine/blob/0e42fd97c0/dlls/ntdll/file.c#L2679

So check io_status and fall back to previous behavior if not
implemented.
2014-03-03 19:34:59 +01:00
Fedor Indutny
c0c9480e02 process: remove debug perror() prints
fix #1128
2014-03-03 21:04:52 +04:00
Saúl Ibarra Corretgé
409c7b37c1 build: add required libraries to libuv.pc.in 2014-03-02 11:46:32 +01:00
thierry-FreeBSD
b870d914eb build: fix configure when PKG_CONFIG is set
If you define the environment variable PKG_CONFIG and assign it to
pkgconf (or pkg-config), configure will say it's OK, but it won't be
used.
2014-03-01 10:22:33 +01:00
Saúl Ibarra Corretgé
e4f28adce4 test: make sure all handles in the loop are closed 2014-02-28 09:33:30 +01:00
StarWing
29ed404138 build: add clean target, improve single file compile on MinGW 2014-02-27 09:52:46 +01:00
Saúl Ibarra Corretgé
422d2810b3 unix, windows: make uv_cwd be consistent with uv_exepath
Fixes #446
2014-02-27 09:44:28 +01:00
Timothy J Fontaine
649dfc3037 Now working on v0.11.22 2014-02-26 18:04:24 -08:00
Timothy J Fontaine
3ef958158a 2014.02.28, Version 0.11.21 (Unstable)
Changes since version 0.11.20:

* unix: fix uv_fs_write when using an empty buffer (Saúl Ibarra
  Corretgé)

* unix, windows: add assertion in uv_loop_delete (Saúl Ibarra Corretgé)
2014-02-26 18:04:23 -08:00
Timothy J Fontaine
2cfb96e9e2 src: bump the version number
There was a bug in the libuv release tool where it didn't properly
update the proper version file.
2014-02-26 17:53:01 -08:00
Saúl Ibarra Corretgé
2611ef43b1 unix, windows: add assertion in uv_loop_delete 2014-02-27 01:05:54 +01:00
Saúl Ibarra Corretgé
3a8767e35e unix: fix uv_fs_write when using an empty buffer 2014-02-26 23:59:29 +01:00
Timothy J Fontaine
6d463bfe37 Now working on v0.11.21 2014-02-26 13:35:14 -08:00
Timothy J Fontaine
88355e081b 2014.02.27, Version 0.11.20 (Unstable)
Changes since version 0.11.19:

* stream: start thread after assignments (Oguz Bastemur)

* fs: `uv__cloexec()` opened fd (Fedor Indutny)

* gyp: qualify `library` variable (Fedor Indutny)

* unix, win: add uv_udp_set_multicast_interface() (Austin Foxley)

* unix: fix uv_tcp_nodelay return value in case of error (Saúl Ibarra
  Corretgé)

* unix: call setgoups before calling setuid/setgid (Saúl Ibarra
  Corretgé)

* include: mark close_cb field as private (Saúl Ibarra Corretgé)

* unix, windows: map EFBIG errno (Saúl Ibarra Corretgé)

* unix: correct error when calling uv_shutdown twice (Keno Fischer)

* windows: fix building on MinGW (Alex Crichton)

* windows: always initialize uv_process_t (Alex Crichton)

* include: expose libuv version in header files (Saúl Ibarra Corretgé)

* fs: vectored IO API for filesystem read/write (Benjamin Saunders)

* windows: freeze in uv_tcp_endgame (Alexis Campailla)

* sunos: handle rearm errors (Fedor Indutny)

* unix: use a heap for timers (Ben Noordhuis)

* linux: always deregister closing fds from epoll (Geoffry Song)

* linux: include grp.h for setgroups() (William Light)

* unix, windows: add uv_loop_init and uv_loop_close (Saúl Ibarra
  Corretgé)

* unix, windows: add uv_getrusage() function (Oleg Efimov)

* win: minor error handle fix to uv_pipe_write_impl (Rasmus Pedersen)

* heap: fix node removal (Keno Fischer)

* win: fix C99/C++ comment (Rasmus Pedersen)

* fs: vectored IO API for filesystem read/write (Benjamin Saunders)

* unix, windows: add uv_pipe_getsockname (Saúl Ibarra Corretgé)

* unix, windows: map ENOPROTOOPT errno (Saúl Ibarra Corretgé)

* errno: add ETXTBSY (Fedor Indutny)

* fsevent: rename filename field to path (Saúl Ibarra Corretgé)

* unix, windows: add uv_fs_event_getpath (Saúl Ibarra Corretgé)

* unix, windows: add uv_fs_poll_getpath (Saúl Ibarra Corretgé)

* unix, windows: map ERANGE errno (Saúl Ibarra Corretgé)

* unix, windows: set required size on UV_ENOBUFS (Saúl Ibarra Corretgé)

* unix, windows: clarify what uv_stream_set_blocking does (Saúl Ibarra
  Corretgé)

* fs: use preadv on Linux if available (Brian White)
2014-02-26 13:33:19 -08:00
Marc Schlaich
2f6d4b4b58 build, windows: do not fail on Windows SDK Prompt 2014-02-26 16:50:43 +01:00
Brian White
269ff0beae fs: use preadv on Linux if available 2014-02-26 16:46:39 +01:00
Saúl Ibarra Corretgé
515be33909 build: fix compilation warning if dtrace doesn't work
Check if dtrace should instrument object files only if dtrace
support is detected to work
2014-02-26 09:45:44 +01:00
Saúl Ibarra Corretgé
b2341e7709 windows: fix typo 2014-02-26 09:25:49 +01:00
Saúl Ibarra Corretgé
b055538d09 unix, windows: clarify what uv_stream_set_blocking does
Also replace the assert with an error on unix.
2014-02-26 00:03:30 +01:00
Saúl Ibarra Corretgé
7ad8f74302 unix, windows: set required size on UV_ENOBUFS
When the supplied buffer is not big enough and UV_ENOBUFS is
returned, hint the user about the required size by setting
the len paramemeter to the required value.

Applies to:
- uv_pipe_getsockname
- uv_fs_event_getpath
- uv_fs_poll_getpath
2014-02-25 11:56:02 +01:00
Saúl Ibarra Corretgé
6f98f4efd1 unix, windows: map ERANGE errno
This is a backport of 2f58bb6 from the master branch
2014-02-25 10:48:26 +01:00
Saúl Ibarra Corretgé
2f58bb6018 unix, windows: map ERANGE errno 2014-02-25 09:51:44 +01:00
Saúl Ibarra Corretgé
8c9d5dce57 unix, windows: add uv_fs_poll_getpath 2014-02-24 23:21:13 +01:00
Saúl Ibarra Corretgé
a7ac2c462a unix, windows: add uv_fs_event_getpath 2014-02-24 22:08:23 +01:00
Saúl Ibarra Corretgé
e5bdef9b59 fsevent: rename filename field to path
Also, it's now considered private.
2014-02-24 21:51:21 +01:00
Saúl Ibarra Corretgé
d3791bd4c3 test: fix compilation warning on non-linux systems 2014-02-24 21:46:19 +01:00
Saúl Ibarra Corretgé
10f9120d78 errno: map EFBIG, ENOPROTOOPT and ETXTBSY
This is a backport of:
107be2bed3
4a023fc078
aaaefe32ca
2014-02-24 12:57:28 +01:00
Fedor Indutny
644337a337 test: fix compiler warning 2014-02-24 15:44:54 +04:00
Fedor Indutny
aaaefe32ca errno: add ETXTBSY
Add `ETXTBSY` which could be returned by file system reads on some
unixes and emulate it with -148 (`ERROR_PATH_BUSY`) on windows.
2014-02-24 15:41:17 +04:00
Saúl Ibarra Corretgé
7677f62c52 test: fix compilation warning 2014-02-24 09:50:34 +01:00
Saúl Ibarra Corretgé
4a023fc078 unix, windows: map ENOPROTOOPT errno
Fixes #1143
2014-02-24 09:19:12 +01:00
Saúl Ibarra Corretgé
5ac214c712 unix, windows: add uv_pipe_getsockname 2014-02-23 20:25:20 +01:00
Saúl Ibarra Corretgé
a442aa7643 doc: small fixes to comments and syntax 2014-02-23 18:01:03 +01:00