Shigeki Ohtsu
c6f2ef25c6
uv.h: add members to any-union of handle and req
2012-06-26 16:24:20 +02:00
Ben Noordhuis
0005b52b70
Update uv_getaddrinfo_cb prototype.
...
Make it clear that the first argument is a req, not a handle.
2012-06-25 01:26:08 +02:00
Ben Noordhuis
61f04877a7
Update uv_getaddrinfo() documentation.
2012-06-23 04:09:22 +02:00
Bert Belder
d831e52e45
uv: now working on v0.9
2012-06-22 20:44:08 +02:00
Ben Noordhuis
f01e9d708a
unix: clarify that uv_getaddrinfo_t is a req
2012-06-22 16:40:45 +02:00
Ben Noordhuis
14ffaa668d
unix, windows: stat: never pass NULL to cb
...
Never pass NULL to the fs_poll callback, use a zeroed out statbuf instead.
Makes the interface a little more convenient to use.
2012-06-20 17:56:37 +02:00
Ben Noordhuis
6d67cf1952
unix, windows: update uv_fs_poll API
...
* the callback gets called only once on error, not repeatedly...
* ...unless the error reason changes from e.g. UV_ENOENT to UV_EACCES
* the callback receives pointers to uv_statbuf_t objects so it can inspect what
changed
2012-06-16 04:54:25 +02:00
Ben Noordhuis
cc7c8542a5
unix, windows: add stat() based file watcher
...
Monitors a file path for changes. Supersedes ev_stat.
2012-05-31 20:32:24 +02:00
Bert Belder
ade6930241
windows: implement uv_disable_stdio_inheritance
2012-06-14 01:19:52 +02:00
Bert Belder
64f8cf463d
windows, unix: uv_buf_init should take unsigned int for the buffer length
2012-06-04 18:04:49 +02:00
Ben Noordhuis
c76c2066c6
unix, windows: add semaphore functions
2012-06-03 04:04:05 +02:00
Bert Belder
3ec9c67f93
windows: improve spawn stdio support
...
* Make using an existing stream for stdio actually work
* Support up to 256 stdio channels
* Fix some minor bugs
2012-06-01 17:47:20 +02:00
Fedor Indutny
f5b5127db0
change spawn() api to allow using existing streams for stdio
...
This commit also adds support for this api on Unix.
2012-06-01 17:32:27 +02:00
Charlie McConnell
69a923bf93
process: implement UV_PROCESS_DETACHED flag for uv_spawn
2012-06-01 02:24:05 +02:00
Ben Noordhuis
171ad8567d
unix, windows: add uv_walk()
...
Lets the libuv user iterate over the open handles. Mostly intended as a
debugging tool or a post-hoc cleanup mechanism.
2012-05-30 02:33:39 +02:00
Igor Zinkovsky
5a34f19970
windows: allow specifying FDs to be inherited by a child process
...
Previously the only option was to create a pipe or an ipc channel. This
patch makes it possible to inherit a handle that is already open in the
parent process. There is also room for setting more than just stdin,
stdout and stderr, although this is not supported yet.
2012-05-28 23:59:58 +02:00
Bert Belder
e4f23aacec
Get rid of UV_LEAN_AND_MEAN
2012-05-28 01:53:22 +02:00
Ben Noordhuis
793a52f5df
unix: pack uv structs more
...
Try to avoid alignment holes on x86_64. Shaves off 4-8 bytes from most structs.
2012-05-24 16:04:01 +02:00
Ben Noordhuis
7c8313bd0f
unix, windows: make uv_run_once() return a bool
...
The return value of uv_run_once() now signals if it needs to be called again.
Fixes #427 .
2012-05-23 20:49:03 +02:00
Bert Belder
d1665792ca
Get rid of UV_HANDLE_TYPE_PRIVATE
2012-05-22 16:11:24 +02:00
Bert Belder
58ba2d86e1
Move shared c-ares glue code from uv-common to cares.c
2012-05-22 16:11:23 +02:00
Bert Belder
c06edd4c88
windows, unix: share c-ares glue code
2012-05-22 16:11:22 +02:00
Igor Zinkovsky
60af28abab
windows: support junctions with uv_fs_synlink
...
based on @piscisaureus implementation
2012-05-17 09:53:26 -07:00
Ben Noordhuis
9efa8b3571
unix, windows: rework reference counting scheme
...
This commit changes how the event loop determines if it needs to stay alive.
Previously, an internal counter was increased whenever a handle got created
and decreased again when the handle was closed.
While conceptually simple, it turned out hard to work with: you often want
to keep the event loop alive only if the handle is actually doing something.
Stopped or inactive handles were a frequent source of hanging event loops.
That's why this commit changes the reference counting scheme to a model where
a handle only references the event loop when it's active. 'Active' means
different things for different handle types, e.g.:
* timers: ticking
* sockets: reading, writing or listening
* processes: always active (for now, subject to change)
* idle, check, prepare: only active when started
This commit also changes how the uv_ref() and uv_unref() functions work: they
now operate on the level of individual handles, not the whole event loop.
The Windows implementation was done by Bert Belder.
2012-05-17 07:07:53 +02:00
Andrius Bentkus
985b961d4e
Put POLL into the handle_map, so handle_size returns the size of it correctly.
2012-05-05 17:31:16 +02:00
Ben Noordhuis
5d19aa84f0
unix, win: rework uv_dlopen() API
2012-05-03 19:36:40 +02:00
Bert Belder
b9504f7987
Rename uv_platform_socket_t to uv_os_sock_t
2012-05-03 16:05:05 +02:00
Bert Belder
e1154d70ce
Api for polling external sockets
2012-05-03 15:51:37 +02:00
Bert Belder
99a995a6b8
uv_spawn: support setting the child process' user and group id
2012-04-28 02:38:41 +02:00
Bert Belder
5342bac4c2
uv.h: make the ssize_t fallback more portable
2012-04-25 00:30:06 +02:00
Ben Noordhuis
feafcdbf5f
include: remove stray backslash
2012-04-18 23:08:33 +02:00
Igor Zinkovsky
d5acfd0c05
64bit offsets for fs operations and cleanup uv_fs_* for uv-win
2012-04-18 11:05:27 -07:00
Ben Noordhuis
132fe600c7
const-ify stream argument to uv_is_readable() and uv_is_writable()
2012-04-18 03:15:53 +02:00
Ben Noordhuis
edb39b2499
const-ify handle argument to uv_is_closing()
2012-04-18 03:11:25 +02:00
Ben Noordhuis
fb6c9eef2a
const-ify handle argument to uv_is_active()
2012-04-18 03:09:53 +02:00
Maciej Małecki
58733d18a6
unix: map EROFS to UV_EROFS
2012-04-16 16:33:35 +02:00
Bert Belder
6ec330a6c3
Add UV_EIO error code
2012-04-12 03:17:04 +02:00
Bulat Shakirzyanov
f09f7bc6a8
Add functions to look up req and handle sizes
...
Useful for FFI bindings. Closes #370 .
2012-04-05 01:39:40 +02:00
Bert Belder
5f38ba1a89
Move private req and handle fields to platform headers
...
And fix other problems introduced with UV_HANDLE_TYPE_MAP and UV_REQ_TYPE_MAP.
2012-04-05 01:28:24 +02:00
Ben Noordhuis
bf9a2b3463
x-macro-ify uv_handle_type and uv_req_type
2012-04-04 09:05:13 +02:00
Vladimir Dronnikov
b309f2e2e6
Add uv_is_closing()
...
Closes #367 .
2012-04-01 21:05:50 +02:00
Igor Zinkovsky
ab8c3b85c1
export uv_is_readable & uv_is_writable
2012-03-29 18:38:33 -07:00
Igor Zinkovsky
c3daa44c25
windows: explicitly disallow sending non-listening or non-connected
...
TCP sockets over IPC
2012-03-29 18:19:01 -07:00
Ben Noordhuis
ef47a627ad
unix: move libeio specific fields to uv-unix.h
2012-03-21 02:11:18 +01:00
Bert Belder
aff94a069c
Add UV_ENOSPC and mappings to it
...
Closes GH-337
2012-03-16 02:31:12 +01:00
Ben Noordhuis
dfda5009c2
unix, win: store ares handles in a binary tree
...
Store the uv_ares_task_t handles in a red-black tree, not a linked list.
Fixes #72 .
2012-03-16 00:49:29 +01:00
Bert Belder
2ef5798c6f
Merge remote-tracking branch 'origin/v0.6'
...
Conflicts:
src/unix/core.c
2012-03-08 03:22:10 +01:00
Bert Belder
1ac71a31e9
Map EBUSY and ENOTEMPTY errors
2012-03-07 21:26:37 +01:00
Nathan Rajlich
5505f2e906
Fix typo in uv.h
2012-03-05 17:32:26 +01:00
Shigeki Ohtsu
b55801f225
win, unix: add uv_dlerror() and uv_dlerror_free()
2012-03-02 16:39:21 +01:00