about summary refs log tree commit homepage
DateCommit message (Collapse)
2011-06-14kgio 2.4.2 - OpenSolaris build fix v2.4.2 2.4-stable
* adds -lnsl and -lsocket checks for OpenSolaris
2011-06-14extconf: -lnsl and -lsocket checks for OpenSolaris
Reported via private email. (cherry picked from commit d224563823accca63fd871260e3f0dad6758c8d4)
2011-05-20kgio 2.4.1 - Kgio.poll avoids EINTR, really v2.4.1
This release fixes a race condition that could allow Errno::EINTR to be raised even though the 2.4.0 release was supposed to stop that. Nobody uses Kgio.poll, really, so this shouldn't be an issue for real code, yet.
2011-05-20Kgio.poll: ensure EINTR never gets raised
Retry on a zero timeout if we get interrupted even if the timeout expired. This is also what IO.select does in Ruby itself.
2011-05-05kgio 2.4.0 - portability fixes and more v2.4.0
== All supported platforms (*nix + MRI 1.8+, Rubinius) * OpenBSD (and possibly other *BSD) fixes, thanks to Jeremy Evans. * kgio_accept and kgio_tryaccept now take an optional second argument for flags (like the accept4() flags argument). == Ruby 1.9-only things * Kgio.poll no longer raises Errno::EINTR to match IO.select. == Ruby 1.9 trunk things * close() on an active FD in a different thread is better handled/detected. * copy-on-write for strings is properly triggered
2011-05-05test_cross_thread_close: disable on RUBY_ENGINE != "ruby"
These aren't well-defined semantics...
2011-05-05read_write: call rb_str_modify() before rb_str_resize()
This is needed under Ruby trunk if the string is not actually resized.
2011-05-05poll: deal with pollset changes on EINTR
This allows callers to modify the pollset, interrupt the polling thread, and then poll with the modified pollset. This is also important for dealing with closed IO objects that may have been invalidated due to GC, too.
2011-05-05test_tcp_connect: disable wait_writable_set test on non-Linux
OpenBSD seems to make connect() return success immediately even on a non-blocking socket, so it's hard to test for. Thanks to Jeremy Evans to reporting the issue under OpenBSD. ref: http://mid.gmane.org/20110505181846.GB9693@jeremyevans.local
2011-05-05fix kgio_peek for !KGIO_NOPUSH systems
Fix kgio_peek by adding an empty kgio_autopush_recv if !KGIO_NOPUSH. ref: http://mid.gmane.org/20110505181846.GB9693@jeremyevans.local Acked-by: Eric Wong <normalperson@yhbt.net>
2011-05-05connect: zero out hints argument for getaddrinfo
Some systems like OpenBSD are stricter about irrelevant fields than GNU/Linux. [ew: commit message] ref: http://mid.gmane.org/20110505181846.GB9693@jeremyevans.local Acked-by: Eric Wong <normalperson@yhbt.net>
2011-05-04Kgio.poll restarts on interrupt
This changes our semantics, but it's unlikely anybody relies on EINTR right now...
2011-04-27extconf: remove unnecessary dir_config statement
I didn't know this about mkmf at the time...
2011-04-21doc: improve kgio_accept/kgio_tryaccept docs
Documenting the new flags options and also improving style of the existing class overrides.
2011-04-21test_autopush: attempting to fix a timing test...
Not fun on slow systems, unfortunately...
2011-04-20doc: fix trywrite call-seq
2011-04-14test_autopush: use assert_in_delta for test
Some systems are slower than others...
2011-04-11gemspec: bump wrongdoc version
2011-04-11gemspec: remove unnecessary require_paths
RubyGems handles it already
2011-04-10add test for cross thread close
Ruby 1.9.3dev has better support for it
2011-04-10read_write: detect closed fd on EINTR
Another thread may have killed the descriptor.
2011-04-10accept: better detect closed files on EINTR/EAGAIN
Another thread may have killed the acceptor object.
2011-03-20*accept methods can take flags argument, like accept4()
This allows applications to not rely on global accept4_flags
2011-03-19accept: prepare optional flags argument to accept() wrappers
Don't force people to rely on global flags, there may be blocking parts of an otherwise non-blocking program...
2011-03-17HACKING: updates for wrongdoc vs rdoc
2011-03-15kgio 2.3.3 - minor fixes v2.3.3
We no longer over-allocate memory for Kgio.poll (1.9.x-only). Under Ruby 1.9.3dev, we also use rb_thread_io_blocking_region to properly deal with cross-thread IO#close.
2011-03-14poll: fix over-allocation for poll(2)
Oops, fortunately we allocated too much and not too little.
2011-03-14use rb_thread_blocking_io_region if possible
It's in Ruby 1.9.3dev and tracks waiting FDs on blocked threads.
2011-02-25doc: more consistent references for kgio_wait_*able methods
Much nicer this way...
2011-02-15kgio 2.3.2 - OpenBSD build fix v2.3.2
Thanks to Jeremy Evans, this release fixes the build under OpenBSD.
2011-02-15Fix build on OpenBSD
OpenBSD's getnameinfo(3) requires the sys/types.h header file, and including it should not cause a problem for other OSes. Acked-by: Eric Wong <normalperson@yhbt.net>
2011-02-13kgio 2.3.1 - compatibility fix v2.3.1
* connect.c: disable AI_NUMERICSERV It's not needed since we already verify the service is a numeric port. AI_NUMERICSERV is not available in older glibc (<2.3.4) and probably other old systems.
2011-02-13connect.c: disable AI_NUMERICSERV
It's not needed since we already verify the service is a numeric port. AI_NUMERICSERV is not available in older glibc (<2.3.4) and probably other old systems.
2011-02-09kgio 2.3.0 - MSG_PEEK and poll(2) support v2.3.0
recv() with MSG_PEEK for sockets is added with the try* interface. SocketMethods#kgio_trypeek and SocketMethods#kgio_peek or Kgio.trypeek for non-Kgio-enabled sockets. For Ruby 1.9 only: poll(2) is exposed via the Kgio.poll singleton method and should provide an alternative for IO.select users. Both of these new features should work well on modern Unix-like operating systems.
2011-02-08move poll support checks to kgio.h
We may use poll elsewhere...
2011-02-08pkg.mk: update to the latest
* Fixes Ruby 1.9.3dev deprecation warnings * Fixes some documentation dependency issues * Allows RUBY_TEST_OPTS to be passed to unit tests
2011-02-08doc: fully RDoc all methods and classes
Whee!
2011-02-08doc: fix accept -> tryaccept copy+paste error
Oops
2011-02-08README: fix download link/ref
2011-02-08preliminary poll(2) support
It's a nice alternative to IO.select for higher-numbered file descriptors, especially sparse ones. Our interface also generates less garbage than IO.select does.
2011-02-06add support for recv() with MSG_PEEK
Kgio.trypeek, kgio_trypeek and kgio_peek methods are added for using with sockets.
2011-02-03kgio 2.2.0 - kinder, gentler I/O for the Internets v2.2.0
* sockets accept()ed by a TCP_NOPUSH/TCP_CORK listener automatically flush on kgio_*read calls if there is pending data. "Kgio.autopush = false" disables this globally, and Kgio::Socket also get "kgio_autopush=" to enable/disable on a per-object individual basis. * ECONNRESET exceptions get empty backtraces for kgio_*read. There's nothing a programmer can do about these, so there's no point in going through the expensive backtrace generation process. * Kgio.try* singleton methods added for working with non-Kgio enhanced objects. No more needing to use Object#extend and blowing away your method cache to make existing I/O objects kinder and gentler. * IPv6 support should be complete, systems without a native getaddrinfo(3) are now unsupported (and will remain so unless somebody complains). There should be no other backwards-incompatible changes other than requiring getaddrinfo(3) and friends for IPv6 support.
2011-02-03add SocketMethods#kgio_addr!
This refreshes (or sets) the @kgio_addr ivar for sockets that didn't go through kgio_accept or kgio_tryaccept.
2011-02-02fix typos in ipv6 test case
Oops, RTFE :P
2011-02-02add proper IPv6 support
No extra #ifdefs, we just won't support old systems without getaddrinfo() and friends anymore. I doubt anybody still has them...
2011-02-01avoid re-interning if GCC is not used (or under 1.8)
Needless calls to rb_intern are wasteful in even semi-frequently used code.
2011-02-01kgio_*read: empty backtrace for ECONNRESET
There's nothing a programmer can do about ECONNRESET so just make the exception cheaper to raise so it can still be logged.
2011-01-31add singleton methods for non-Kgio objects
This allows people to more easily use Kgio in existing apps.
2011-01-31autopush: enable accessors for client sockets
Might as well allow clients to efficiently handle TCP_CORK/TCP_NOPUSH, too.
2011-01-31autopush: enable this by default
TCP_CORK (and presuably TCP_NOPUSH) aren't remotely useful in Rainbows! without this and there's almost no overhead for MRI, either.