Bert Belder
d402604118
windows: inline a couple of inline request functions
2012-06-02 23:08:22 +02:00
Bert Belder
ed30365f54
uv-common: define INLINE macro
2012-06-02 23:06:43 +02:00
Bert Belder
dd1355da8d
windows: stop poll watcher when watched socket is closed locally
2012-06-02 22:36:52 +02:00
Bert Belder
bdb8b3a1f2
windows: always set FDs 0-2 for spawned child processes
2012-06-02 21:17:03 +02:00
Bert Belder
619686e9e9
windows: fix fall-through bug in init_child_stdio()
2012-06-02 21:05:06 +02:00
Bert Belder
d21fc6c333
windows: move uv_hrtime() to util.c
...
* It has nothing to do with timer handles, so it doesn't belong in
timer.c
* uv_hrtime_init() was merged into uv__util_init()
2012-06-02 20:37:08 +02:00
Bert Belder
ec95a07d00
windows/util: move initialization code to uv__util_init
2012-06-02 20:35:14 +02:00
Bert Belder
cd1298c388
windows: retrieve function pointers before doing anything else
2012-06-02 20:20:51 +02:00
Bert Belder
1d64a36caa
windows: add support for cpu times to uv_cpu_info()
...
* Also cleans up the code and makes it use unicode APIs consistently.
* Credits go to Brian White for creating an earlier version of this
patch.
Closes #327
2012-06-02 20:05:12 +02:00
Brian White
4252240e54
windows: add uv__once_init() that ensures that libuv has been initialized
2012-06-02 20:05:12 +02:00
Brian White
87f3530a1e
windows: retrieve NtQuerySystemInformation at startup
2012-06-02 20:05:11 +02:00
Bert Belder
120d997809
windows: fix NTSTATUS redefined when compiling with MinGW
...
Closes #403
Closes #422
2012-06-02 17:39:31 +02:00
Bert Belder
961e0cf8da
windows/tty: never report error after forcibly aborting line-buffered read
2012-06-02 03:08:48 +02:00
Bert Belder
07f0175239
windows: fix hang when closing an active poll handle
2012-06-01 18:39:49 +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
Bert Belder
528123ad9a
windows: fix bugs in uv__fast_poll_cancel_poll_req
2012-06-01 03:05:31 +02:00
Charlie McConnell
69a923bf93
process: implement UV_PROCESS_DETACHED flag for uv_spawn
2012-06-01 02:24:05 +02:00
Bert Belder
aecddfe530
windows: style fix
2012-05-31 17:35:25 +02:00
Bert Belder
0c727fd774
windows: don't crash
2012-05-31 17:34:53 +02:00
Ben Noordhuis
c9396dd57e
unix: implement timers in libuv
...
* replace libev backed timers with a pure libuv implementation
* gut ev_run() and make it take a timeout instead of flags
Incidentally speeds up the loop_count_timed benchmark by about 100%.
2012-05-31 03:08:34 +02:00
Ben Noordhuis
71a66c17a1
unix: mark eio poll handles as internal
2012-05-30 02:33:50 +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
Ben Noordhuis
122cd94695
unix: remove unused flag UV__PENDING
2012-05-30 01:34:11 +02:00
Ben Noordhuis
9d26f49725
unix, windows: rename flags UV__ACTIVE, UV__REF
...
Rename UV__ACTIVE and UV__REF to UV__HANDLE_ACTIVE and UV__HANDLE_REF to make
it clear that they apply to handles, not requests or loops.
2012-05-30 01:30:24 +02:00
Ben Noordhuis
58a272e556
unix: rework pending handle/req logic
2012-05-30 00:08:22 +02:00
Bert Belder
7556590707
win/process.c: stdio fd should default to ignore
2012-05-29 00:53:04 +02:00
Ben Noordhuis
18e622d43e
unix: fix indentation in sunos.c
2012-05-29 00:09:47 +02:00
Bert Belder
81aff93633
win/process.c: remove unused function duplicate_std_handle
2012-05-29 00:06:11 +02:00
Ben Noordhuis
4690204682
unix: fix getaddrinfo bad pointer deref
2012-05-29 00:06:11 +02:00
Fedor Indutny
c0081f0e66
unix: 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. It also makes it possible to set more than just stdin,
stdout and stderr.
2012-05-29 00:05:12 +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
2ec09862e4
unix, windows: set active flag on unref'd handles
...
A logic bug in uv__handle_start() and uv__handle_stop() stopped the active flag
from getting set (or unset) on unref'd handles.
2012-05-28 00:24:39 +02:00
Ben Noordhuis
028fef84b8
unix: update timer if already active
...
uv_timer_start() no longer returns an error when the timer is already active,
now it just updates the timer. Consistent with the uv-win implementation.
Fixes #425 .
2012-05-26 02:09:59 +02:00
Ben Noordhuis
ce28e13038
unix: remove unused __attribute__((unused))
2012-05-25 01:24:17 +02:00
isaacs
604802ad47
Fix sunos build: undeclared variable 'handle'
2012-05-24 23:00:31 +02:00
Ben Noordhuis
752ac30ec8
unix: don't pass sockaddr to accept()
...
Shaves a few nanoseconds off the accept() syscall.
2012-05-24 14:31:53 +02:00
Ben Noordhuis
cff2221fbf
unix: split up loop.c
...
Move prepare/check/idle watcher code to loop-watcher.c so it can be reused for
the linux backend.
2012-05-23 23:47:06 +02:00
Ben Noordhuis
890d443558
unix: shave about 100 bytes off uv_udp_send_t
2012-05-23 23:21:08 +02:00
Ben Noordhuis
e71495c84a
unix: turn field stream->blocking into a flag
...
Saves 4 bytes.
2012-05-23 22:48:57 +02:00
Ben Noordhuis
5fd2c406f1
unix: fix up asserts in core.c and stream.c
2012-05-23 22:19:12 +02:00
Ben Noordhuis
2609e43632
unix: remove unnecessary functions in udp.c
2012-05-23 21:18:40 +02:00
Ben Noordhuis
2b09cc2246
unix: fix up asserts in udp.c
2012-05-23 21:08:40 +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
Ben Noordhuis
3604b8ddd3
unix: don't unlink UNIX socket on EADDRINUSE
...
It was a bad idea to start with...
2012-05-23 14:06:32 +02:00
Ben Noordhuis
2e3e658be1
unix: fix uv_poll CPU usage spike
...
Saúl Ibarra Corretgé reports that calling uv_poll_start() repeatedly results
in CPU usage spikes. Fixed by stopping the poll I/O watcher before updating it.
Fixes #424 .
2012-05-23 12:52:44 +02:00
Ben Noordhuis
5b9c45120a
unix: fold uv__io_cb into ev_io struct
...
Makes the uv__io code a little more obscure but has the advantage that
sizeof(uv__io_t) == sizeof(ev_io), i.e. the sizes of embedding handles
don't change.
2012-05-23 03:57:08 +02:00
Ben Noordhuis
3bc9707054
unix: replace ev_io with uv__io_t
...
Replace ev_io usage with wrapper constructs.
This is preliminary work for the transition to a libev-less linux backend.
2012-05-23 03:42:32 +02:00
Igor Zinkovsky
2df831723f
windows: set flags for uv_fs_symlink
2012-05-22 16:32:17 -07:00