Vladimir Dronnikov
b309f2e2e6
Add uv_is_closing()
...
Closes #367 .
2012-04-01 21:05:50 +02:00
Ben Noordhuis
685b36ba66
linux: tidy up syscall code
2012-03-31 00:19:01 +00:00
Ben Noordhuis
4ff0898c5f
unix: replace uv__close() with close()
...
uv__close() was deprecated a while ago. It's been an alias for close() ever
since. Remove it.
2012-03-21 02:11:18 +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
Ben Noordhuis
2f886c892e
unix: don't rely on libev to track timer state
...
An obscure libev bug sometimes makes it miss state changes. Keep track of the
state ourselves.
Fixes joyent/node#2515 .
2012-02-28 17:24:50 +01:00
Ben Noordhuis
ec0eff955e
Revert b3e0ad4, 149d32c, e99fdf0 and ea9baef.
...
Detaching doesn't work yet, the setsid() call fails and leaves the child process
attached to the parent's session.
Revert "test: Add test case for spawning detached child processes."
Revert "win: Implement options.detached for uv_spawn() for Windows."
Revert "unix: Implement options.detached for uv_spawn() for unix."
Revert "Add "detached" member to uv_process_options_t to denote whether a child
process should spawn detached from its parent."
This reverts commit ea9baef95c .
This reverts commit e99fdf0df6 .
This reverts commit 149d32cb96 .
This reverts commit b3e0ad4db8 .
2012-02-28 15:29:05 +01:00
Charlie McConnell
149d32cb96
unix: Implement options.detached for uv_spawn() for unix.
2012-02-24 15:15:00 +01:00
Ben Noordhuis
d3efefb043
linux: share inotify fd across event loop
...
Previously, a new inotify fd was created for each watcher, making it quite easy
to run into the system-wide fs.inotify.max_user_instances limit (usually 128).
Fixes #300 .
2012-02-23 09:21:30 -08:00
Ben Noordhuis
abdc3efffe
unix: add uv__dup()
2012-01-30 21:44:27 +01:00
Ben Noordhuis
28b0867f03
unix: clean up udp shutdown sequence
2012-01-18 20:18:57 +01:00
Ben Noordhuis
ee10cb77bd
unix: use container_of() instead of w->data
2012-01-18 19:34:22 +01:00
Ben Noordhuis
dee86dd5b0
unix: don't retry close() on EINTR
...
Linux 2.6 always closes the file descriptor, even on EINTR. Retrying the close()
call isn't merely useless, it's actively harmful - the file descriptor may have
been acquired by another thread.
2012-01-18 15:06:30 +01:00
Ben Noordhuis
71f6c0edb8
Merge remote-tracking branch 'origin/v0.6'
...
Conflicts:
src/win/util.c
2012-01-16 18:07:49 +01:00
Ben Noordhuis
6d9c9a533f
Add uv_loop_refcount() function, debug tool.
2012-01-14 00:33:08 +01:00
Ben Noordhuis
a13584bec7
unix: remove unused #define
2012-01-13 15:59:53 +01:00
Daisuke Murase
e8494dddc0
unix: use EVRUN_ONCE in uv_run_once()
...
EVRUN_NOWAIT means "poll and don't block". Use EVRUN_ONCE instead, "wait for
single event".
2012-01-11 10:15:25 +01:00
Paddy Byers
abf9654a55
unix: create separate eio result queue per loop
...
Makes the eio "done" callback run in the thread that submitted it. Makes it safe
to use libeio from multiple event loops.
2011-12-20 20:47:33 +01:00
Ben Noordhuis
10de090b9e
unix: centralize loop init logic
...
Also fixes a bug where loops other than the main loop didn't pick the kqueue
backend, which broke the fs event watcher on Darwin and the BSDs.
2011-12-20 20:47:33 +01:00
Ben Noordhuis
6b3075cd73
linux: improve kernel feature detection
...
Do not check for minimum kernel and glibc versions, just check that the kernel
headers export the syscall number and invoke the syscall directly. Effectively
bypasses glibc.
2011-12-16 15:16:31 +01:00
mattn
e53cecb8c0
add uv_run_once()
2011-12-14 14:28:35 +01:00
Ben Noordhuis
4c6008f488
Merge branch 'v0.6'
...
Conflicts:
test/test-list.h
2011-12-12 18:04:17 +01:00
Shigeki Ohtsu
ba52023ef3
Fix missing increments of loop->counters
2011-12-12 18:01:26 +01:00
Ben Noordhuis
0d8cb08f83
Merge branch 'v0.6'
2011-12-08 16:31:52 +01:00
Ben Noordhuis
34e95d1a4c
unix: make it safe to delete the default loop
...
Fixes a potential free() of non-malloc'ed memory.
2011-12-04 13:20:23 +01:00
Ben Noordhuis
f5c2a4a1ae
Merge branch 'v0.6'
...
Conflicts:
src/unix/core.c
src/win/winapi.h
2011-12-02 18:15:04 +01:00
Igor Zinkovsky
dceb3e65ca
uv_cwd + uv_chdir
2011-12-01 12:27:12 -08:00
Ben Noordhuis
b52b8c7128
util: add uv_strlcpy() and uv_strlcat() functions
2011-11-23 17:29:02 +01:00
Ben Noordhuis
d5b26154f7
linux: improve kernel feature detection
...
Do not check for minimum kernel and glibc versions, just check that the kernel
headers export the syscall number and invoke the syscall directly. Effectively
bypasses glibc.
2011-11-17 18:05:53 +01:00
Ben Noordhuis
26806e2b1c
sunos: add getaddrinfo() compatibility hack
...
getaddrinfo() returns EAI_MEMORY if strlen(hostname) >= MAXHOSTNAMELEN
2011-11-10 16:39:03 +00:00
Ben Noordhuis
4794c12f58
linux: fall back to traditional syscalls if necessary
...
libuv uses feature checks to determine if newer syscalls like pipe2() are
available. This works fine until someone compiles libuv against kernel headers
that are newer than the actual kernel our software runs on.
Fall back to traditional (but race-y!) syscalls when the kernel reports ENOSYS
or EINVAL.
2011-11-09 15:38:51 +01:00
Ben Noordhuis
7b973eb4ad
Fix uv_loop_new() and uv_default_loop() function prototypes.
2011-11-06 04:04:32 +01:00
Ben Noordhuis
77a2477c3f
unix: add EAI_NODATA #ifdef guard, freebsd doesn't have it
2011-11-03 02:38:31 +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
Ben Noordhuis
f2c6b4106d
unix: have uv_strerror() handle getaddrinfo() errors
2011-10-28 01:31:55 +02: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
Igor Zinkovsky
81c4043c83
ipc on windows
2011-10-06 10:17:42 -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
saghul
b594dba248
unix: fix memcpy when copying hints on uv_getaddrinfo
2011-09-29 15:32:26 +02: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
7e8645d101
unix,win: Make uv_freeaddrinfo to clean up addrinfo
...
Fixes #196
2011-09-23 09:31:01 -07:00
Ben Noordhuis
2a1c32a60c
linux: implement file watcher API
2011-09-21 13:23:49 -07:00
Ryan Dahl
2ef8f359ee
tty fixes for unix
2011-09-20 13:14:16 -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
3c96410902
unix: bring back uv__stream_destroy()
...
This is the revised version of reverted commit 431195c .
2011-09-14 04:48:56 +02:00
Ryan Dahl
828b6eb11d
unix: remove uv_init
2011-09-12 11:32:41 -07:00
Erick Tryzelaar
efa1b54076
Subclass uv_getaddrinfo_t from uv_req_t.
...
This patch also fixes #155 . Since we no longer
memset clear the uv_getaddrinfo_t, the user can
now set the `uv_getaddrinfo_t->data` field without
problems.
2011-09-10 01:46:26 -07:00
Ben Noordhuis
ca5346f9ce
unix: revert 98b9f58 and 431195c for now, corrupts memory
2011-09-09 23:40:10 +02:00
Ben Noordhuis
431195c944
unix: run callbacks of pending writes when handle is closed
2011-09-08 19:15:22 +02:00
Ben Noordhuis
cc91989cc2
unix: fix buffer overrun in uv__strlcpy()
...
Reported by Thomas Shinnick.
2011-09-06 15:44:47 +02:00
Ben Noordhuis
bb0c6e6d53
unix: move linux feature detection macros to internal.h
2011-09-05 16:05:28 +02:00
Ryan Dahl
142a70292b
unix: fix fs_chmod
2011-09-04 16:09:45 -07:00
Bert Belder
12b01e95f9
Specialize uv_xxx_getsockname, add uv_tcp_getpeername
2011-09-04 04:49:13 +02:00
Ryan Dahl
836cc204b6
unix: Fix test-gethostbyname
2011-08-31 15:37:16 -07:00
Ryan Dahl
6fd340b8ca
unix: split out stream into its own file
2011-08-31 13:41:22 -07:00
Ryan Dahl
38ce213b6a
unix: split out pipe
2011-08-31 13:29:17 -07:00
Ryan Dahl
510407c03d
unix: split out tcp module
2011-08-31 13:11:38 -07:00
Ryan Dahl
e553f96f94
unix: split out uv_spawn into src/unix/process.c
2011-08-31 11:50:08 -07:00
Ryan Dahl
490c83dd35
move src/uv-unix.c to src/unix/core.c
2011-08-31 11:26:43 -07:00