Commit Graph

71 Commits

Author SHA1 Message Date
Bert Belder
c4dbb60cff windows: basic signal handling support with uv_signal_t
This still needs tests.
2012-08-17 19:38:29 +02:00
Bert Belder
95a742be02 Revert "windows: readable tty handles need access to console output"
This is not the way to go.
This reverts commit 1b929bfff5.
2012-08-17 19:38:28 +02:00
Bert Belder
1b929bfff5 windows: readable tty handles need access to console output
Readable tty handles need to be able to update the virtual window,
so if uv_tty_t is initialized with a console input fd, additionally
open the console output.
2012-08-17 00:10:18 +02:00
Bert Belder
88634c1405 windows: separate uv_tty_t read state from write state 2012-08-17 00:10:15 +02:00
Bert Belder
7cf1b67594 windows: small style fix in uv-win.h 2012-08-16 23:11:26 +02:00
Bert Belder
938a30589c windows: tweak formatting inside uv-win.h 2012-08-15 03:13:58 +02:00
Bert Belder
4442ddcaae windows: fix formatting issue in uv-win.h 2012-08-14 00:19:19 +02:00
Bert Belder
7c3ba514e7 windows: use WCHAR consistently 2012-08-13 22:31:48 +02:00
Bert Belder
aa69f34d53 windows: report spawn errors to the exit callback
Formerly spawn errors would be reported as a message printed to the
process' stderr, to match unix behaviour. Unix has now been fixed to
be more sensible, so this hack can now be removed.

This also fixes a race condition that could occur when the user closes
a process handle before the exit callback has been made.
2012-08-13 22:31:47 +02:00
Ben Noordhuis
ee50db6e36 unix, windows: preliminary signal handler support
* a no-op on Windows for now
* only supports the main loop on UNIX (again, for now)
2012-08-10 02:00:07 +02:00
Ben Noordhuis
21f2c1629a include: fix macro formatting 2012-08-08 02:18:59 +02:00
Ben Noordhuis
4168855da5 include: move ssize_t workaround to uv-win.h 2012-07-31 00:05:03 +02:00
Bert Belder
514265ec6e windows: fix memory leaks in fs
Also clean up the code in various ways.
2012-07-31 00:04:48 +02:00
Bert Belder
b496c1221c windows: reserve some room for zero-read minibuffer 2012-06-19 21:11:17 +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
07c6ac2b55 windows: move child stdio buffer ops to a separate file 2012-06-13 19:17:13 +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
Bert Belder
d1665792ca Get rid of UV_HANDLE_TYPE_PRIVATE 2012-05-22 16:11:24 +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
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
d7a71761c4 Windows: implement uv_poll 2012-05-03 15:52:52 +02:00
Bert Belder
19aca7a7c0 Windows: add uv_msafd_poll, to support overlapped socket polling 2012-05-02 03:45:00 +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
1b6329dd3e Style fixes 2012-04-25 00:30:07 +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
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
42095c85a0 Remove UV_ARES_TASK_PRIVATE_FIELDS.
It's only used internally, it doesn't have to be part of a public header file.
2012-04-03 02:44:50 +02:00
Igor Zinkovsky
70925c3bb9 windows: Enable passing of TCP connections over IPC 2012-03-29 18:18:46 -07:00
Bert Belder
1d942e2ad4 Merge branch 'v0.6' 2012-02-13 20:02:39 +01:00
Bert Belder
6c80bf34d3 Clean up error handling in win/fs.c, add some error mappings 2012-02-13 20:01:19 +01:00
Ben Noordhuis
c5aa86bd39 Remove uv_import() and uv_export().
Not needed anymore now that support for isolates has been removed from Node.

This commit reverts the following commits:

  812e410 test: fix up stream import/export test
  e34dc13 unix: implement uv_import() and uv_export()
  d1a0e8e test: fix undefined macro error
  2ce0058 import/export streams accross loops
2012-02-12 15:49:54 +01:00
Igor Zinkovsky
2ce0058251 import/export streams accross loops 2012-01-30 21:44:27 +01:00
Igor Zinkovsky
4d1d02fd18 windows: ensure that uv_fs_event callbacks have long names 2011-12-30 14:59:28 -08:00
Igor Zinkovsky
60630dab0f windows: enable pending pipe instances knob 2011-12-01 13:48:57 -08:00
Igor Zinkovsky
78f4b120a1 windows: knob for tuning number of concurrent accept requests 2011-10-31 23:37:45 -07:00
Bert Belder
90e15f1110 Implement uv_dlopen and friends 2011-10-29 00:52:34 +02:00
Bert Belder
fb7138614d Improve ansi escape code support on windows 2011-10-20 19:31:24 -07:00
Igor Zinkovsky
28234d7336 windows: ref pipe writes to keep the event loop alive 2011-10-20 15:14:55 -07:00
Igor Zinkovsky
54982a23ef windows: stdio over non-overlapped pipes 2011-10-20 15:14:39 -07:00
Bert Belder
51e9dbc2bb Work around windows udp bug, allow zero reads 2011-10-20 15:01:31 -07:00
Igor Zinkovsky
72b5976e83 windows: support utf8 in uv_fs functions
fixes #201
2011-10-12 13:24:22 -07:00
Igor Zinkovsky
4ac13090ca fix mingw build 2011-10-11 10:45:02 -07:00
Igor Zinkovsky
012fc0799f windows: fixes #193. Ensures that uv_fs_event deals with short and long names 2011-10-06 19:39:06 -07:00
Igor Zinkovsky
34f719d7a5 windows ipc fixes 2011-10-06 10:17:42 -07:00
Igor Zinkovsky
81c4043c83 ipc on windows 2011-10-06 10:17:42 -07:00