Commit Graph

2712 Commits

Author SHA1 Message Date
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é
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
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
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
Rasmus Pedersen
616167e149 win: fix C99/C++ comment
This commit converts C++ style comment to C style comment
2014-02-23 17:36:20 +04:00
Keno Fischer
d4f904b0e7 heap: fix node removal 2014-02-23 11:57:43 +04:00
rcp
0943d3cb33 win: minor error handle fix to uv_pipe_write_impl
This commit ensures a proper win32 error code is returned
from uv_pipe_write_impl in case of failure.
2014-02-22 03:09:20 +04:00
Lars Gierth
cd67e10ece build: update android toolchain
gcc-4.7 has been removed in revision r9c. More info:
http://developer.android.com/tools/sdk/ndk/index.html#Revisions
2014-02-21 18:54:52 +01:00
Lars Gierth
1ad61807ff test: fix spawn_stdout_and_stderr_to_file test
S_IREAD and S_IWRITE are obsolete in GNU libs and
not included in the Android NDK's libc. See
http://www.gnu.org/savannah-checkouts/gnu/libc
/manual/html_node/Permission-Bits.html
2014-02-21 18:54:52 +01:00
Oleg Efimov
da9a2b1d3d unix, windows: add uv_getrusage() function 2014-02-21 18:50:15 +01:00
Saúl Ibarra Corretgé
787f5fff92 unix, windows: add uv_loop_init and uv_loop_close
These functions supersede uv_loop_new and uv_loop_delete.
uv_loop_init initialized a user allocated loop and uv_loop_close
removes all associated resources a loop uses after it has finished
execution.

uv_loop_new and uv_loop_delete are now deprecated.
2014-02-21 09:56:13 +01:00
William Light
bfba45d285 linux: include grp.h for setgroups() 2014-02-20 15:53:48 +01:00
Rasmus Pedersen
fd35e7a0bd test: fix VC++ warning C4244 2014-02-20 11:32:07 +01:00
Geoffry Song
780d8ad8e5 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.
2014-02-19 17:13:49 +04:00
Ben Noordhuis
f17c535b73 unix: use a heap for timers
Replace the red-black tree with a heap.  The most common operation that
libuv performs on timers is looking up the first timer to expire.  With
a red-black tree, that operation is O(log n).  With a heap, it's O(1).
2014-02-19 13:36:14 +01:00
Fedor Indutny
fc40836f9a Merge branch 'v0.10'
Conflicts:
	src/unix/sunos.c
2014-02-19 00:18:25 +04:00
Fedor Indutny
703a9e601e sunos: handle rearm errors
fix #1078
2014-02-19 00:14:13 +04:00
Bert Belder
d9872ae2ad Merge branch 'v0.10'
Conflicts:
	build.mk
	test/test-shutdown-twice.c
2014-02-18 19:19:52 +01:00
Alexis Campailla
4f913b669a windows: freeze in uv_tcp_endgame
The event_handle field of unused accept requests was not being
initialized properly. As a result, uv_tcp_endgame would try to close
an invalid handle and this could lead to unexpected behavior.

This fixes node.js test test-cluster-disconnect.js on Windows.
2014-02-18 19:16:47 +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
Timothy J Fontaine
3310ff4a9e build: update dtrace m4 check for sunos
The check to see if -G is needed for dtrace requires a bit more effort,
make a header, c file, and object file.
2014-02-18 07:31:05 -08:00
Saúl Ibarra Corretgé
d7c8cffecb windows: fixed compilation warning 2014-02-18 11:35:01 +01:00
Marc Schlaich
8010bf9dd2 build, windows: fixed x64 configuration issue 2014-02-18 10:02:05 +01: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
Saúl Ibarra Corretgé
d4c12adff6 include: expose libuv version in header files 2014-02-17 20:53:20 +01:00
Alex Crichton
6f62d62c90 windows: always initialize uv_process_t
The unix implementation of uv_spawn always starts out with a
uv__handle_init, but the windows implementation sometimes bails out
early before calling uv__handle_init. This means that uv_close on a
failed uv_spawn will always succeed on unix but sometimes fail on
windows.

This commit lifts the initialization of the uv_process_t above all of
the error checking to ensure that uv_close will always work when
uv_spawn returns an error.
2014-02-16 13:09:54 +01:00