Saúl Ibarra Corretgé
02e1ebd40b
include: remove unneeded EADDRINFO errno
...
EADDRINFO is not a readl errno, it was used to signal any error that
getaddrinfo would return, but we return actual errors now.
2014-08-07 21:24:55 +02:00
Saúl Ibarra Corretgé
a9a4872c29
Now working on v0.11.29
2014-08-07 12:21:41 +02:00
Saúl Ibarra Corretgé
fc9e2a0bc4
2014.08.08, Version 0.11.28 (Unstable)
...
Changes since version 0.11.27:
* unix, windows: const-ify handle in uv_udp_getsockname (Rasmus
Pedersen)
* windows: use UV_ECANCELED for aborted TCP writes (Saúl Ibarra
Corretgé)
* windows: add more required environment variables (Jameson Nash)
* windows: sort environment variables before calling CreateProcess
(Jameson Nash)
* unix, windows: move uv_loop_close out of assert (John Firebaugh)
* windows: fix buffer overflow on uv__getnameinfo_work() (lilohuang)
* windows: add uv_backend_timeout (Jameson Nash)
* test: disable tcp_close_accept on Windows (Saúl Ibarra Corretgé)
* windows: read the PATH env var of the child (Alex Crichton)
* include: avoid using C++ 'template' reserved word (Iñaki Baz Castillo)
* include: fix version number (Saúl Ibarra Corretgé)
2014-08-07 12:18:10 +02:00
Saúl Ibarra Corretgé
6bcb799a0d
include: fix version number
2014-08-07 12:17:06 +02:00
Iñaki Baz Castillo
a1ff22cb7e
include: avoid using C++ 'template' reserved word
...
Closes #1394
2014-08-06 12:52:46 +02:00
Alex Crichton
c7e4b31444
windows: read the PATH env var of the child
...
The unix and windows process implementations diverge in their behavior
when dealing with subprocesses that are spawned with a relative path.
With unix the *child's* PATH environment variable is read, whereas
with windows the *parent's* environment variable is read.
This commit brings the two implementation in line with respect to
their behavior of reading PATH by having both read the *child's* PATH
environment variable. This involves looking into the user-provided
environment on windows and extracting the PATH variable specifically
so it can be inspected later on.
2014-08-06 02:12:44 +02:00
Saúl Ibarra Corretgé
d802486232
test: disable tcp_close_accept on Windows
...
It always was a Unix only test
2014-08-05 00:14:26 +02:00
Jameson Nash
2e9d86e105
windows: add uv_backend_timeout
2014-08-04 23:18:38 +02:00
lilohuang
89fc7d80c4
windows: fix buffer overflow on uv__getnameinfo_work()
...
According to
http://msdn.microsoft.com/en-us/library/windows/desktop/ms738531.aspx ,
"NodeBufferSize" and "ServiceBufferSize" parameters of GetNameInfoW()
function are expected to represent the number of WCHAR, not the buffer size
of memory layout.
2014-08-04 09:18:51 +02:00
John Firebaugh
2cd91f9768
unix, windows: move uv_loop_close out of assert
...
Closes #1387
2014-08-02 09:41:09 +02:00
Jameson Nash
8db42383ad
windows: sort environment variables before calling CreateProcess
2014-08-01 09:26:21 +02:00
Jameson Nash
2ce14cfab4
windows: add more required environment variables
...
Adds more of the undocumented-but-required environment variables for uv_spawn
2014-08-01 09:26:21 +02:00
Saúl Ibarra Corretgé
431b535a51
windows: use UV_ECANCELED for aborted TCP writes
...
For consistency with Unix
2014-08-01 00:23:51 +02:00
Rasmus Christian Pedersen
e72d48ddab
unix, windows: const-ify handle in uv_udp_getsockname
2014-07-31 22:27:36 +02:00
Timothy J Fontaine
ff6a718dfc
Now working on v0.11.28
2014-07-31 10:11:03 -07:00
Timothy J Fontaine
ffe24f9550
2014.07.32, Version 0.11.27 (Unstable)
...
Changes since version 0.11.26:
* unix, windows: use the same threadpool implementation (Saúl Ibarra
Corretgé)
* unix: use struct sockaddr_storage for target UDP addr (Saúl Ibarra
Corretgé)
* doc: add documentation to uv_udp_start_recv (Andrius Bentkus)
* common: use common uv__count_bufs code (Andrius Bentkus)
* unix, win: add send_queue_size and send_queue_count to uv_udp_t
(Andrius Bentkus)
* unix, win: add uv_udp_try_send (Andrius Bentkus)
* unix: return UV_EAGAIN if uv_try_write cannot write any data (Saúl
Ibarra Corretgé)
* windows: fix compatibility with cygwin pipes (Jameson Nash)
* windows: count queued bytes even if request completed immediately
(Saúl Ibarra Corretgé)
* windows: disable CRT debug handler on MinGW32 (Saúl Ibarra Corretgé)
* windows: map ERROR_INVALID_DRIVE to UV_ENOENT (Saúl Ibarra Corretgé)
* unix: try to write immediately in uv_udp_send (Saúl Ibarra Corretgé)
* unix: remove incorrect assert (Saúl Ibarra Corretgé)
* openbsd: avoid requiring privileges for uv_resident_set_memory (Aaron
Bieber)
* unix: guarantee write queue cb execution order in streams (Andrius
Bentkus)
* img: add logo files (Saúl Ibarra Corretgé)
* aix: improve AIX compatibility (Andrew Low)
* windows: return bind error immediately when implicitly binding (Saúl
Ibarra Corretgé)
* windows: don't use atexit for cleaning up the threadpool (Saúl Ibarra
Corretgé)
* windows: destroy work queue elements when colsing a loop (Saúl Ibarra
Corretgé)
* unix, windows: add uv_fs_mkdtemp (Pavel Platto)
* build: handle platforms without multiprocessing.synchronize (Saúl
Ibarra Corretgé)
* windows: change GENERIC_ALL to GENERIC_WRITE in fs__create_junction
(Tony Kelman)
* windows: relay TCP bind errors via ipc (Alexis Campailla)
2014-07-31 10:11:01 -07:00
Alexis Campailla
6d3a051eb4
windows: relay TCP bind errors via ipc
...
This is the libuv side of the fix for Node's cluster module on Windows.
https://github.com/joyent/node/issues/7691
Windows and Unix return certain socket errors (i.e. EADDRINUSE) at
different times: bind on Windows, and listen on Unix.
In an effort to hide this difference, libuv on Windows stores such
errors in the bind_error field of uv_tcp_t, to defer raising it at
listen time.
This worked fine except for the case in which a socket is shared in
a Node cluster and a bind error occurs.
A previous attempt to fix this (
d1e6be1460
3da36fe00e
) was flawed becaused in an attempt to relay the error at the JS level
it caused the master to start accepting connections.
With this new approach, libuv itself is relaying the bind errors,
providing for a uniform behavior of uv_tcp_listen.
2014-07-31 17:24:40 +02:00
Tony Kelman
3d73d55627
windows: change GENERIC_ALL to GENERIC_WRITE in fs__create_junction
...
Fixes #1385
See ReactOS's mklink implementation and
http://stackoverflow.com/a/10508724
2014-07-31 14:39:26 +02:00
Saúl Ibarra Corretgé
c11a598d7c
build: handle platforms without multiprocessing.synchronize
2014-07-31 10:12:58 +02:00
Pavel Platto
e99b89f2ad
unix, windows: add uv_fs_mkdtemp
2014-07-31 09:43:55 +02:00
Saúl Ibarra Corretgé
beb54fe72d
windows: destroy work queue elements when colsing a loop
...
Destroy the async handle used to notify about work being done, and the
mutex used to protect each loop's work queue.
Closes #1375
2014-07-28 09:40:23 +02:00
Saúl Ibarra Corretgé
c8abb29f68
windows: don't use atexit for cleaning up the threadpool
...
If libuv is loaded as a DLL and is later unloaded deadlocks can happen
when running atexit handlers, so we can't use synchronization
priomitives or join threads there.
For reference see https://github.com/saghul/pyuv/issues/171
2014-07-28 09:38:57 +02:00
Saúl Ibarra Corretgé
645e2a2855
doc: update link to pyuv in README
2014-07-27 12:33:02 +02:00
Saúl Ibarra Corretgé
1ece8fb85f
windows: return bind error immediately when implicitly binding
...
If a TCP handle is bound automatically when calling uv_listen or
uv_connect, there is a remote possibility that it fails, return
the error if so.
2014-07-25 12:48:16 +02:00
Andrew Low
cdc979dbe0
aix: improve AIX compatibility
2014-07-22 22:57:24 +02:00
Saúl Ibarra Corretgé
06c60e9662
doc: add logo image to README
2014-07-20 19:38:46 +02:00
Saúl Ibarra Corretgé
a499b737bf
img: add logo files
2014-07-20 18:24:28 +02:00
Andrius Bentkus
960eefb319
unix: guarantee write queue cb execution order in streams
...
The problem was that the canceled write callbacks
were being called before the already written callbacks, even
though they were queued after them.
2014-07-18 13:16:10 +02:00
Aaron Bieber
38323c9fbf
openbsd: avoid requiring privileges for uv_resident_set_memory
2014-07-16 09:56:34 +02:00
Graham Lee
dc1ea27c73
doc: clarify the return value of uv_default_loop
2014-07-13 11:23:08 +02:00
Saúl Ibarra Corretgé
817c09257d
unix: remove incorrect assert
...
After 41891222bc landed it's possible that uv__udp_sendmsg is called
even if there are no pending write nor write completed requests:
1. User calls uv_udp_send and the request is sent immediately. The
request is the added to the completed queue and we 'feed' the uv__io
handle so that we process the completed request in the next
iteration.
2. User calls uv_udp_send again but the request is not completed
immediately, so it's queued in the write_queue.
3. The uv__io handle gets a UV__POLLOUT event and uv__udp_sendmsg is
run, which completes the send request and puts it in the
write_completed_queue. Afterwards, uv__udp_run_completed is executed
and the write_completed queue is drained.
4. At this point, the uv__io handle was made pending in step 3, in
uv__udp_sendmsg, but we no longer have requests to write or to complete,
so we skip processing.
2014-07-11 22:53:59 +02:00
Saúl Ibarra Corretgé
9e921ed1e5
doc: clarify why we don't use SO_REUSEADDR for TCP on Windows
2014-07-08 18:57:35 +02:00
Saúl Ibarra Corretgé
ad78e456e9
test: fix watcher_cross_stop
...
It's possible that recv_cb_called is bigger than the number of sockets,
because if all sends succeed the recv callback is called twice: once
with the actual data, and another time with 0.
2014-07-08 18:44:38 +02:00
Saúl Ibarra Corretgé
41891222bc
unix: try to write immediately in uv_udp_send
2014-07-08 18:44:38 +02:00
Iñaki Baz Castillo
bf6e90f4d6
doc: cleanup API documentation in uv.h
2014-07-06 22:33:15 +02:00
Saúl Ibarra Corretgé
c44f264641
windows: map ERROR_INVALID_DRIVE to UV_ENOENT
2014-07-06 21:00:59 +02:00
mattn
b17223cd60
build: fix build on MinGW32
2014-07-06 20:40:59 +02:00
Saúl Ibarra Corretgé
636b108d37
windows: disable CRT debug handler on MinGW32
...
We cannot actually use it because the header is not present, so disable
it. On MinGW-w64 it does work though.
2014-07-06 20:40:59 +02:00
Saúl Ibarra Corretgé
377bf68a2a
windows: count queued bytes even if request completed immediately
...
The send_queue_size/count needs to maintain its value until right before
the callback is called.
2014-07-06 20:10:17 +02:00
Jameson Nash
ebafb90acd
windows: fix compatibility with cygwin pipes
...
This makes libuv more tolerant to the properties of the pipes
that it can use without any issue. This is necessary because Cygwin
(and hence Mintty) opens STDIN without FILE_WRITE_ATTRIBUTES.
2014-07-06 20:05:32 +02:00
Andrius Bentkus
b9b386ac5a
doc: grammar, udp documentation fix up
2014-07-05 11:23:48 +02:00
Saúl Ibarra Corretgé
b018dc5b72
test: simplify test-tcp-try-write
...
Use a smaller buffer thus making sure that uv_try_write will succeed at
least once
2014-07-05 11:06:39 +02:00
Saúl Ibarra Corretgé
40ad12e5be
unix: return UV_EAGAIN if uv_try_write cannot write any data
2014-07-04 20:45:09 +02:00
Andrius Bentkus
0d43992c3b
unix, win: add uv_udp_try_send
...
The function returns UV_EAGAIN if the queue is not empty and
the message couldn't be sent immediately.
2014-07-04 18:30:33 +02:00
Andrius Bentkus
b769484ca3
unix, win: add send_queue_size and send_queue_count to uv_udp_t
...
This functionality is present in stream and uv_udp_t has a queue
as well so it makes sense for udp to have a send_write_size.
Since udp sends entire messages atomically, the send_queue_count field
lets the user determine how many messages are there left to send.
2014-07-04 18:28:18 +02:00
Andrius Bentkus
f63e073be2
common: use common uv__count_bufs code
...
Until now it was reimplemented in 2 different places (unix, win).
2014-07-04 18:28:18 +02:00
Andrius Bentkus
d17bfc617e
doc: add documentation to uv_udp_start_recv
2014-07-02 18:49:06 +02:00
Saúl Ibarra Corretgé
1830a3cd91
Revert "test: make barrier test more rigorous"
...
This reverts commit 6c6c922167 .
It introduced a race condition which made tests fail on Linux and SunOS.
Closes #1340
2014-07-02 00:16:50 +02:00
Saúl Ibarra Corretgé
4bace4d67c
unix: use struct sockaddr_storage for target UDP addr
2014-06-29 23:52:46 +02:00
Saúl Ibarra Corretgé
8d11aacb79
unix, windows: use the same threadpool implementation
2014-06-27 14:27:04 +02:00