Bert Belder
1997e10b50
Add flags to uv_fs_event_init
2011-11-05 01:42:08 +01:00
Igor Zinkovsky
faca1402ef
make uv_pipe_connect return void
2011-11-04 16:06:53 -07:00
Ryan Dahl
681bd290e6
UV_EACCESS -> UV_EACCES
...
In order to match existing Node API. See
https://github.com/joyent/node/pull/2001
2011-11-03 16:17:12 -07:00
Ryan Dahl
147487afe6
UNIX: Error map ENOTSOCK
2011-11-03 16:08:58 -07:00
Ryan Dahl
0698e3f905
Fix UNIX pipe connect error reporting, add test
2011-11-03 15:47:43 -07:00
Ben Noordhuis
77a2477c3f
unix: add EAI_NODATA #ifdef guard, freebsd doesn't have it
2011-11-03 02:38:31 +01:00
Ryan Dahl
e1bee05ecd
UNIX: Loop on blocking streams
...
Also removes a superfluous syscall during uv_tty_init for writable TTY
streams.
2011-11-02 16:47:01 -07:00
Igor Zinkovsky
74b49e821b
uv_kill
2011-11-02 14:34:07 -07:00
Ben Noordhuis
8d5c64adf5
unix: map EAFNOSUPPORT error code
2011-11-02 17:20:00 +01:00
Igor Zinkovsky
9c6103a479
windows: add tests for uv_tcp_simultaneous_accepts
2011-11-01 01:13:13 -07:00
Igor Zinkovsky
78f4b120a1
windows: knob for tuning number of concurrent accept requests
2011-10-31 23:37:45 -07:00
Ben Noordhuis
bd82d02467
ev: fix epoll_init file descriptor leak
...
Fix the edge case where epoll_init() leaks a file descriptor when it is called
when the process has no open file descriptors.
2011-10-31 04:21:24 +01:00
Ben Noordhuis
70381cef9b
unix: add getaddrinfo compatibility hack
...
Revisit in the future. This is not a good hack.
2011-10-30 02:55:12 +01:00
Ben Noordhuis
84bc18684e
linux: omit superfluous fcntl(F_GETFD) syscall
2011-10-29 05:32:34 +02:00
Ben Noordhuis
ed2b5e60cb
linux: use ioctl(FIONBIO) to set O_NONBLOCK, saves a syscall
2011-10-29 01:31:11 +02:00
Bert Belder
90e15f1110
Implement uv_dlopen and friends
2011-10-29 00:52:34 +02:00
Ben Noordhuis
f2c6b4106d
unix: have uv_strerror() handle getaddrinfo() errors
2011-10-28 01:31:55 +02:00
Ben Noordhuis
3e4af533ae
sunos: implement file watcher API
2011-10-26 03:49:34 +00:00
Ryan Dahl
b5d69f9a3e
Map EHOSTUNREACH on Unix
2011-10-24 14:07:49 -07:00
Ben Noordhuis
ec825ffc62
unix: add TCP keepalive and no-delay control knobs
2011-10-21 16:08:26 -07:00
Ben Noordhuis
9da53df457
unix: fix uv_freeaddrinfo() segfault on sunos
...
The system freeaddrinfo() on SunOS does not handle NULL values graciously.
2011-10-21 14:20:36 -07:00
Ben Noordhuis
d396799210
Change return type of uv_get_*_memory() functions
...
... from double to uint64_t. Limit use of floating point in public API as much
as possible.
2011-10-21 10:09:59 -07:00
Ben Noordhuis
9757a43a57
unix: remove unused variable
2011-10-21 10:09:43 -07:00
Ryan Dahl
2c7e8bb137
Map EAI_NONAME to ENOENT
2011-10-20 17:13:48 -07:00
Ben Noordhuis
c0e5db2d49
linux: fix events after close bug
2011-10-20 15:02:50 -07:00
Ben Noordhuis
2069a24e8c
unix: fix file descriptor leak
2011-10-15 02:34:30 +02:00
Frank DENIS
4ab1990064
unix: add support for OpenBSD
2011-10-14 01:59:45 +02:00
Ryan Dahl
c903bc3f32
unix: fix a few compiler warnings
2011-10-12 12:25:05 -07:00
Ben Noordhuis
197f591ebc
common: add UV_ENOTDIR error code
2011-10-12 16:43:29 +02:00
Ben Noordhuis
721ad8c74f
sunos: implement uv_fs_futime()
2011-10-12 02:05:52 +00:00
Ben Noordhuis
e0a4e72640
sunos: look up free memory with sysconf(_SC_AVPHYS_PAGES)
2011-10-12 00:27:30 +00:00
Ben Noordhuis
61343ecfbd
common: add UV_ENOSYS error code
2011-10-11 23:15:41 +02:00
Roman Shtylman
a3d1f6fd6f
add uv_udp_set_membership for unix multicast support
...
- test-udp-multicast-join tests that multicast packets can be received
- stub src/win/udp.c until support added
2011-10-11 21:25:20 +02:00
Ben Noordhuis
47d22acfb2
unix: stub kqueue support functions on old platforms
2011-10-11 16:53:42 +02:00
Ben Noordhuis
f7f518aa7e
sunos: fix uv_spawn()
...
SunOS does not set POLLHUP when the read end of a pipe is closed.
2011-10-10 23:59:54 +00:00
Ryan Dahl
5656e3c8bd
Prepare for writable TTY to be blocking
2011-10-10 13:25:46 -07:00
Ben Noordhuis
41e8574920
unix: don't alloc memory for readdir on empty dir
2011-10-10 16:27:55 +02:00
Ryan Dahl
1c72aebd78
unix: IPC stdio stream should be duplex
2011-10-07 01:41:42 -07:00
Ben Noordhuis
5816f2d21c
unix: avoid unnecessary read() syscall
2011-10-07 02:32:52 +02:00
Ryan Dahl
e3bcecdc42
unix: clean up messy code
2011-10-06 14:52:44 -07:00
Ryan Dahl
60c639fd57
Merge branch 'ipc2'
2011-10-06 10:18:13 -07:00
Igor Zinkovsky
81c4043c83
ipc on windows
2011-10-06 10:17:42 -07:00
Ryan Dahl
61fab8d1ba
unix: return UV_UNKNOWN_HANDLE when read2 doesn't recv one
...
unix passes ipc test on this comment.
2011-10-06 10:17:42 -07:00
Ryan Dahl
c920db9fd1
unix: handle passing kind of working
2011-10-06 10:17:42 -07:00
Ryan Dahl
bb6b629e6a
make test-ipc accept the pending tcp server
2011-10-06 10:17:18 -07:00
Ryan Dahl
45306f2e7f
unix: implement uv_write2
2011-10-06 10:17:18 -07:00
Ryan Dahl
6921d2fc07
Add argument to uv_pipe_init for IPC, unix impl
2011-10-06 10:17:07 -07:00
okuoku
d1016de597
FreeBSD: Fix FreeBSD build.
2011-10-06 17:00:50 +02:00
Ben Noordhuis
c7870465aa
error reporting: return sensible messages for synthetic errors
2011-10-06 01:17:46 +02:00
Erick Tryzelaar
4c329060ca
unix,win: Start unifying shared bind code.
2011-10-04 16:46:39 -07:00
Erick Tryzelaar
85368e8d45
unix,win: Start unifying shared tcp connect code.
2011-10-04 16:46:39 -07:00
Ryan Dahl
b590e12148
Fix darwin build
2011-10-04 16:44:36 -07:00
Ben Noordhuis
8e9a3384c9
unix: implement kqueue file watcher API
...
kqueue fds are not embeddable into other pollsets (select, poll, kqueue).
Hack the libev event loop to receive kqueue events with filter flags intact.
2011-10-04 23:28:36 +02:00
Fedor Indutny
a35591bbfc
os: implement loadavg (not working on cygwin/win)
2011-10-04 18:15:14 +02:00
Fedor Indutny
33cb8775bc
os: implement memory bindings
...
* us_get_free_memory
* us_get_total_memory
2011-10-04 18:10:35 +02:00
Ben Noordhuis
914a6fa241
sunos: pull in uv__set_sys_error prototype
2011-10-01 22:43:47 +00:00
Ryan Dahl
fe18438416
add uv_tty_reset_mode()
2011-09-30 13:09:06 -07:00
Ryan Dahl
153d3c7c57
unix: allow tty raw mode to be turned off
2011-09-30 11:21:51 -07:00
saghul
b594dba248
unix: fix memcpy when copying hints on uv_getaddrinfo
2011-09-29 15:32:26 +02:00
Igor Zinkovsky
e7a53aed48
fix windows build
2011-09-28 11:52:08 -07:00
Erick Tryzelaar
23796d208c
Fixes #76 . Unify OS error reporting
...
As a nice fringe benefit, this also shaves a word
off of a windows TCP handle by replacing "uv_err_t
bind_error" with "int bind_error".
2011-09-27 19:05:33 -07:00
Erick Tryzelaar
1d7e61fafa
unix,win: Check bind receives right socket type
2011-09-27 19:05:33 -07:00
Erick Tryzelaar
c260a39645
unix,win: Check connect receives right socket type
2011-09-27 19:05:33 -07:00
Ben Noordhuis
9673abeab5
unix: fix pointer ownership bug
...
libuv realloc'd a pointer that belonged to and was later freed by libev.
2011-09-27 01:02:44 +02:00
Ben Noordhuis
d31a57dc78
unix: fix NULL pointer dereference
2011-09-25 02:53:27 +02:00
Ben Noordhuis
01441ab02f
unix: fix close() of potentially uninitialized fd
2011-09-25 02:49:21 +02:00
Ben Noordhuis
8f617b93bc
unix: darwin < 10.6 does not have fdatasync, use fsync
2011-09-24 05:20:07 +02:00
Ryan Dahl
03d0c57ea2
Remove uv_is_tty. Use uv_guess_handle instead.
2011-09-23 10:01:45 -07:00
Erick Tryzelaar
7e8645d101
unix,win: Make uv_freeaddrinfo to clean up addrinfo
...
Fixes #196
2011-09-23 09:31:01 -07:00
Fedor Indutny
7ce34f2ada
added missing headers file
2011-09-23 09:20:20 -07:00
Ryan Dahl
03652596cf
unix: add uv_guess_handle and uv_tty_get_winsize
2011-09-22 19:35:46 -07:00
Ben Noordhuis
3368d6c1a2
unix: stub file watcher implementation
...
The file watcher API has not been implemented on all Unices yet.
Provide stubs on those platforms so libuv at least compiles.
2011-09-22 23:55:05 +02:00
Ben Noordhuis
bee7112de0
unix: move container_of and SAVE_ERRNO to internal.h
2011-09-22 00:51:46 +02:00
Ben Noordhuis
2a1c32a60c
linux: implement file watcher API
2011-09-21 13:23:49 -07:00
Ben Noordhuis
12d3680cd4
unix: fix warning: implicit declaration of function ‘isatty’
2011-09-21 19:26:25 +02:00
Ben Noordhuis
236b96a8cf
unix: define HAVE_FUTIMES on freebsd
2011-08-17 07:01:29 +02:00
Ben Noordhuis
c455f37803
unix: freebsd doesn't have fdatasync, do a full fsync instead
2011-08-17 06:40:39 +02:00
Ryan Dahl
c03d42607e
More tty on unix fixes
2011-09-20 14:59:30 -07:00
Ryan Dahl
2ef8f359ee
tty fixes for unix
2011-09-20 13:14:16 -07:00
Ryan Dahl
c1374ba587
Add uv_is_tty()
2011-09-20 11:48:47 -07:00
Ben Noordhuis
37e8bf2556
unix: fix dangling pointer free() bug
2011-09-19 17:23:23 +02:00
Erick Tryzelaar
70e1032094
unix: Fix uv_getaddrinfo from deleting invalid data
...
If the uv_getaddrinfo_t handle is owned by its
data pointer, deleting the data in the callback
could cause uv_getaddrinfo_done to call freeaddrinfo
on an invalid pointer.
2011-09-19 17:11:34 +02:00
Ben Noordhuis
75a088ebf1
unix: remove failed write requests from stream->write_queue_size
2011-09-16 16:17:23 -07:00
Ben Noordhuis
3c0684e832
unix: pass error to write callback in stream cleanup
2011-09-16 16:17:23 -07:00
Ryan Dahl
d0a46a5551
HAVE_FUTIMES on osx
2011-09-16 16:03:48 -07:00
Ryan Dahl
2640aae125
unix: Reset flags for stdio fds after fork
2011-09-15 15:24:09 -07:00
Erick Tryzelaar
905fe71341
unix: fix a compiler warning
2011-09-15 22:33:32 +02:00
Igor Zinkovsky
65c8a727a3
uv_fs_ functions to return result in sync mode
2011-09-14 11:47:49 -07:00
Ben Noordhuis
76216d8057
unix: handle readdir errors in uv__fs_after()
2011-09-14 17:59:44 +02:00
Ben Noordhuis
337ff16526
unix: revert "eio: fix memory leak in eio__scandir()"
...
This reverts commit b450d87719 .
It turns out that libeio doesn't actually leak memory but it does do an
unnecessary (and confusing!) allocation that is not free'd until after
the user callback returns.
2011-09-14 17:59:41 +02:00
Ben Noordhuis
4b9b692bb7
unix: fix off-by-one error in comparison
...
Only 3 of the 4 buffer list entries were being used.
2011-09-14 04:50:05 +02:00
Ben Noordhuis
3c96410902
unix: bring back uv__stream_destroy()
...
This is the revised version of reverted commit 431195c .
2011-09-14 04:48:56 +02:00
Ben Noordhuis
bca49960fb
unix: handle stream write errors properly
...
1. Ensure that failed writes don't leave the write queue in an inconsistent
state. Before, write requests were handed back to the user but were not
removed from the write queue. The cause of at least one use-after-free bug.
2. Pass the error to the callback on the next iteration of the event loop
instead of returning it immediately.
2011-09-14 04:16:45 +02:00
Ben Noordhuis
066dc6bcc8
unix: fix argument check / write request init order
2011-09-14 01:42:57 +02:00
Ben Noordhuis
21936ebf24
unix: remove unnecessary variable
2011-09-14 01:40:55 +02:00
Ben Noordhuis
d70c760338
unix: fix write queue double init
2011-09-14 01:38:51 +02:00
isaacs
3c00d87b42
Add EEXIST handling
...
Additionally, map ERROR_ALREADY_EXISTS to EEXIST on Windows. I'm a bit
unsure about this mapping. Could a windows person confirm?
2011-09-12 16:36:35 -07:00
Ryan Dahl
e7eeacb4ae
unix: implement uv_tty_set_mode
2011-09-12 14:52:59 -07:00
Ryan Dahl
4484d61fe1
Add interfaces for uv_pipe_open, uv_tty_init, uv_tty_set_mode
...
Nothing works - no tests. This is just to coordinate efforts between Bert
and I.
2011-09-12 14:32:14 -07:00
Ben Noordhuis
2f2223f2b2
sunos: fix compiler errors, sun is a #define
2011-09-12 23:14:54 +02:00