Commit Graph

138 Commits

Author SHA1 Message Date
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
cdb44df86d unix: add UNREACHABLE() macro
Asserts and aborts when program flow reaches a place it shouldn't.
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
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
Ryan Dahl
51ea46de45 Merge remote branch 'origin/v0.6' 2012-01-09 11:31:13 -08:00
Ben Noordhuis
803f5a096e linux: fix build on older distros 2012-01-09 15:43:00 +01:00
Ryan Dahl
3dd4ecb493 unix: expose uv__make_socketpair, uv__make_pipe in unix/internal.h 2011-12-29 22:37:33 -08: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
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
ef811b1a4f Merge branch 'v0.6' 2011-11-23 19:06:08 +01:00
Ben Noordhuis
96c230344d linux: fix build when compiling with -std=c89 -pedantic 2011-11-23 19:05:46 +01: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
224584c53e sunos: check that event ports supports fs watching 2011-11-10 20:04:55 +01:00
Ben Noordhuis
ec825ffc62 unix: add TCP keepalive and no-delay control knobs 2011-10-21 16:08:26 -07:00
Ben Noordhuis
721ad8c74f sunos: implement uv_fs_futime() 2011-10-12 02:05:52 +00: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
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
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
236b96a8cf unix: define HAVE_FUTIMES on freebsd 2011-08-17 07:01:29 +02:00
Ryan Dahl
d0a46a5551 HAVE_FUTIMES on osx 2011-09-16 16:03:48 -07: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
eb987bcc5c unix: deduplicate stream init logic
Move shared init logic into uv__stream_init().
2011-09-10 01:40:47 +02: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
efcd273d68 unix: translate fs errno codes to libuv error codes 2011-09-06 00:17:18 +02:00
Ben Noordhuis
bb0c6e6d53 unix: move linux feature detection macros to internal.h 2011-09-05 16:05:28 +02: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
e97958ac3b unix: Split out c-ares integration into separate file 2011-08-31 11:23:29 -07:00
Ryan Dahl
58461d5ae7 split out unix's udp source 2011-08-31 11:23:29 -07:00
Ryan Dahl
e3f910d0a9 Multiplicity update on unix
Does not yet support multithreaded use of the thread pool.
2011-08-30 23:55:08 -07:00
Ryan Dahl
3be275bad7 Begin implementation of UNIX uv_fs_ functions
Adding this incomplete work now to ease rebase troubles later as it moves
the functions to src/unix/fs.c and introduces src/unix/internal.h.
2011-08-29 14:36:45 -07:00