Ben Noordhuis
b64c359557
include: document barrier functions
...
Add some basic doc comments to the uv_barrier_*() functions and document
the "serializer" return value from the previous commit.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-07 07:57:09 -07:00
Ben Noordhuis
91985d48f6
unix, windows: make uv_barrier_wait() return bool
...
Make uv_barrier_wait() return a boolean value indicating whether this
thread was the "serializer".
From `man pthread_barrier_wait`:
Upon successful completion, the pthread_barrier_wait() function
shall return PTHREAD_BARRIER_SERIAL_THREAD for a single (arbitrary)
thread synchronized at the barrier and zero for each of the other
threads.
Exposing that information from libuv is useful because it can make
cleanup significantly easier:
if (uv_barrier_wait(&barrier) > 0)
uv_barrier_destroy(&barrier);
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-07 07:57:08 -07:00
Saúl Ibarra Corretgé
eee4776549
windows: fix handling closed socket while poll handle is closing
...
fixes #1278
2014-05-30 19:19:36 +02:00
Saúl Ibarra Corretgé
aab8d9dab4
doc: clarify return value when UV_RUN_NOWAIT is used
...
Signed-off-by: Saúl Ibarra Corretgé <saghul@gmail.com>
2014-05-25 23:39:40 +02:00
Saúl Ibarra Corretgé
4fac9427e4
unix, windows: fix parsing scoped IPv6 addresses
...
Signed-off-by: Saúl Ibarra Corretgé <saghul@gmail.com>
2014-05-25 23:30:46 +02:00
Saúl Ibarra Corretgé
e7b3c3fb6b
unix, windows: define UV__INET/6_ADDRSTRLEN constants
2014-05-25 23:30:40 +02:00
HungMingWu
6d56e6e132
windows: remove redundant code in uv_tcp_write
...
The overlapped structure is reset twice, it is non necessary.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-24 19:08:27 +04:00
Fedor Indutny
e002340e50
heap: fix heap_remove()
...
Remove should shuffle items in both directions, not just down. It is
required, because `max` node could be not the actual maximum value in
the tree.
fix #1267
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-23 20:04:42 +04:00
Rasmus Christian Pedersen
70c42563c1
unix, windows: getnameinfo implementation
...
Closes #852
2014-05-20 17:33:52 +02:00
Saúl Ibarra Corretgé
1579788c50
unix, windows: avoid error in uv_fs_event_stop
...
For consistency with other handle types, if stop is called while the
handle wasn't started yet, it's a no-op.
2014-05-13 10:05:39 +02:00
Rasmus Christian Pedersen
ecaede660c
unix, windows: uv_dlerror const argument
2014-05-13 00:00:54 +02:00
Rasmus Christian Pedersen
f629075530
win: open_named_pipe const argument
2014-05-13 00:00:54 +02:00
Rasmus Christian Pedersen
687322432d
win: minor coding style cleanup
2014-05-13 00:00:54 +02:00
Ryan Cole
907b55e4bf
process: adjust quote_cmd_arg for empty arguments
...
adjust quote_cmd_arg so that empty command line
arguments are double quoted instead of skipped
2014-05-12 23:55:58 +02:00
Luka Perkov
85e17ca665
doc: refer to README.md to find out more information about tests
...
Reason for this change is because 'make test' command does not work.
Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
2014-05-12 23:51:35 +02:00
Saúl Ibarra Corretgé
4ce5470f3a
unix: fix uv__open_cloexec usage
...
It returns the fd or the negated errno.
2014-05-12 11:23:13 +02:00
Saúl Ibarra Corretgé
386d2141e4
unix, windows: be consistent when binding implictly in UDP
...
Only these functions will trigger an implicit binding of a UDP handle:
- uv_udp_send
- uv_udp_recv_start
- uv_udp_set_membership
All other functions will return UV_EBADF in case the socket was not
bound.
Note: currently the socket is created and bound at the same time. This
may change in the future.
2014-05-08 15:12:09 +02:00
Saúl Ibarra Corretgé
fa0e1e5071
unix, windows: remove unneeded define
2014-05-08 09:08:33 +02:00
Saúl Ibarra Corretgé
9f51f26e96
unix: fix handling error on UDP socket creation
2014-05-08 00:35:22 +02:00
JD Ballard
e56717ae98
windows: add invert ANSI (7 / 27) emulation
2014-05-03 09:13:28 -03:00
JD Ballard
21b1b87d12
windows: add VT100 codes ?25l and ?25h
2014-05-02 09:27:33 -03:00
Trevor Norris
32597100b8
thread: add uv_thread_cb typedef
...
To keep with convention, add a typedef for the function called that
initializes the new thread.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-02 01:33:13 +04:00
Timothy J Fontaine
b5548f18c9
Now working on v0.11.26
2014-05-01 09:16:48 -07:00
Timothy J Fontaine
2acd544cff
2014.05.02, Version 0.11.25 (Unstable)
...
Changes since version 0.11.24:
* osx: pass const handle pointer to uv___stream_fd (Chernyshev
Viacheslav)
* unix, windows: pass const handle ptr to uv_tcp_get*name (Chernyshev
Viacheslav)
* common: pass const sockaddr ptr to uv_ip*_name (Chernyshev Viacheslav)
* unix, windows: validate flags on uv_udp|tcp_bind (Saúl Ibarra
Corretgé)
* unix: handle case when addr is not initialized after recvmsg (Saúl
Ibarra Corretgé)
* unix, windows: uv_now constness (Rasmus Pedersen)
2014-05-01 09:16:45 -07:00
Rasmus Christian Pedersen
87ae69b638
unix, windows: uv_now constness
...
uv_now doesnt require modification of uv_loop_t as such argument is
changed to a const uv_loop_t* as this more in spirit with remaining
API in libuv.
2014-04-29 19:39:13 -03:00
Trevor Norris
4d905fbe07
test: close stream immediately on error
...
If there is an error in the uv_read_cb, close the uv_stream_t
immediately instead of waiting until the uv_write_cb, and only close the
stream in after_write() if it hasn't been closed already.
2014-04-24 16:48:27 -07:00
Saúl Ibarra Corretgé
76eb7518c6
doc: clarify what the addr argument of uv_udp_recv_cb contains
2014-04-23 19:28:30 +02:00
Saúl Ibarra Corretgé
f55b853be5
unix: handle case when addr is not initialized after recvmsg
...
If the handle was opened using `uv_udp_open` ift's possible that the
kernel doesn't fill in the msg_name field, so return NULL as the address
in that case.
fixes #1252
2014-04-23 19:19:23 +02:00
Stephen von Takach
fc5f11bf9f
windows: fix build error
...
Previously using Windows DevKit 8.1
`tcp.c(250): error C2275: 'SOCKET' : illegal use of this type as an
expression`
2014-04-23 17:49:52 +10:00
Saúl Ibarra Corretgé
9b4f2b84f1
unix, windows: validate flags on uv_udp|tcp_bind
...
fixes #1247
2014-04-22 22:57:01 +02:00
Saúl Ibarra Corretgé
d86d86633e
doc: clarify uv_try_write return values
2014-04-22 08:41:16 +02:00
Chernyshev Viacheslav
20d092edc8
common: pass const sockaddr ptr to uv_ip*_name
...
uv_ip4_name and uv_ip6_name do not modify passed sockaddr pointer,
so there is no need to keep this parameter non-const.
2014-04-18 12:07:38 +02:00
Chernyshev Viacheslav
886e2bcd55
unix, windows: pass const handle ptr to uv_tcp_get*name
...
uv_tcp_getsockname and uv_tcp_getpeername do not modify passed handle
pointer, so there is no need to keep this parameter non-const.
2014-04-18 12:07:38 +02:00
Chernyshev Viacheslav
4018f72615
osx: pass const handle pointer to uv___stream_fd
...
uv___stream_fd does not modify passed parameter, so non-const
pointer is not required here.
2014-04-18 12:07:38 +02:00
Saúl Ibarra Corretgé
8514c1c1a3
authors: fix name
2014-04-17 17:50:16 +02:00
Rasmus Pedersen
cd6e74dd80
test: fix compilation warnings with VC++
...
C6011 and C4244
2014-04-17 17:31:11 +02:00
Trevor Norris
f212ceffae
include: reorder UV_HANDLE_PRIVATE_FIELDS
...
The fields for UV_HANDLE_PRIVATE_FIELDS in uv-win.h and uv-unix.h are
the same, but in different order. Simply swap them so uv_handle_t are
the same on both platforms.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-04-17 14:31:23 +04:00
Timothy J Fontaine
1daff47ae9
Now working on v0.11.25
2014-04-14 09:56:52 -07:00
Timothy J Fontaine
ed948c29f6
2014.04.15, Version 0.11.24 (Unstable)
...
Changes since version 0.11.23:
* linux: reduce file descriptor count of async pipe (Ben Noordhuis)
* sunos: support IPv6 qualified link-local addresses (Saúl Ibarra
Corretgé)
* windows: fix opening of read-only stdin pipes (Alexis Campailla)
* windows: Fix an infinite loop in uv_spawn (Alex Crichton)
* windows: fix console signal handler refcount (李港平)
* inet: allow scopeid in uv_inet_pton (Fedor Indutny)
* win: always leave crit section in get_proc_title (Fedor Indutny)
2014-04-14 09:56:49 -07:00
Fedor Indutny
2e82c3bd37
Merge branch 'v0.10'
...
Conflicts:
src/win/signal.c
src/win/util.c
2014-04-14 20:54:34 +04:00
Fedor Indutny
ffb49220cf
win: always leave crit section in get_proc_title
...
fix #1235
2014-04-14 20:49:15 +04:00
Fedor Indutny
6a657dcbee
include: add reserved field for #926
...
Introduce reserved field to be able to fix #926 after v0.12 release.
2014-04-14 20:44:49 +04:00
Fedor Indutny
2b21419242
inet: allow scopeid in uv_inet_pton
...
We already support it in `uv_ip6_addr` anyway.
See https://github.com/joyent/node/issues/7395
2014-04-14 15:47:50 +04:00
Fedor Indutny
23d130b209
Revert "inet: allow scope in uv_inet_pton ip6 check"
...
This reverts commit d30e3ab65a , because it
is a new feature!
2014-04-14 15:13:20 +04:00
Fedor Indutny
d30e3ab65a
inet: allow scope in uv_inet_pton ip6 check
...
Note that isn't actually parsing it, since the output value is a
`struct in6_addr`.
see https://github.com/joyent/node/issues/7395
2014-04-14 12:45:42 +04:00
Saúl Ibarra Corretgé
b9d5396a40
windows: fix console signal handler refcount
...
Backport of 0c726e7 from master
2014-04-12 10:09:40 +02:00
Fedor Indutny
69f9f6ffef
test: fix EPIPE race in spawn_closed_process_io
...
The just created stdin should not be closed by a child process before
writing to it, otherwise EPIPE happens.
2014-04-11 18:24:48 +02:00
李港平
0c726e76a0
windows: fix console signal handler refcount
2014-04-10 17:09:45 +02:00
Alex Crichton
deff0e3571
test: Close process handles when spawn fails
...
This should avoid assertions tripping in debug mode.
2014-04-10 07:29:31 -07:00
Alex Crichton
621c4a3929
windows: Fix an infinite loop in uv_spawn
...
The PATH-parsing code for windows erroneously contained an infinite
loop when the PATH started with a leading semicolon. Each iteration of
the loop usually bumped over the separator, but if the first character
was a semicolon then it would never skip it, causing the infinite
loop.
Closes #909
2014-04-10 07:29:24 -07:00