Date | Commit message (Collapse) |
|
We support IPv6, not just IPv4
|
|
It's there for kgio_wait_readable
|
|
In case the toolchain can't test the feature properly
or Ruby is upgraded and the symbol is added.
|
|
Some installations of Ruby clobbered my usual CFLAGS=-Wall
|
|
IO.select can handle fd >= 1024 safely in some Rubies while
fd_set may not. We could use rb_thread_fd_select(), but
rb_wait_for_single_fd() is available now so the former
is not worth the maintenance hassle.
|
|
Kgio::File may be used to open FIFOs, so non-blocking
I/O is still useful in that context.
|
|
It is possible but unlikely to get ENOMEM on open(2),
so try to GC away some files.
|
|
New feature in 2.5, we now have 100% documentation again.
|
|
New features are better if they're documentated.
|
|
Non-profit TLD is better sounding for a Free Software
project.
|
|
|
|
* 2.4-stable:
kgio 2.4.2 - OpenSolaris build fix
extconf: -lnsl and -lsocket checks for OpenSolaris
|
|
* adds -lnsl and -lsocket checks for OpenSolaris
|
|
Reported via private email.
(cherry picked from commit d224563823accca63fd871260e3f0dad6758c8d4)
|
|
io/wait doesn't have an IO#wait_writable method, yet[1]
and IO#wait checks FIONREAD which makes it unsuitable
for certain descriptors.
This method uses the new rb_wait_for_single_fd() function in
Ruby 1.9.r. This internally uses ppoll() under Linux, meaning
it performs the same regardless of the FD used.
[1] http://redmine.ruby-lang.org/issues/4647
[2] http://redmine.ruby-lang.org/issues/4849
|
|
Reported via private email.
|
|
We won't waste time with inferior, non-Free platforms.
|
|
Fixes locale issues with grep and adds check-warnings
|
|
* 2.4-stable:
kgio 2.4.1 - Kgio.poll avoids EINTR, really
Kgio.poll: ensure EINTR never gets raised
|
|
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.
|
|
Retry on a zero timeout if we get interrupted
even if the timeout expired. This is also what
IO.select does in Ruby itself.
|
|
Retry on a zero timeout if we get interrupted
even if the timeout expired. This is also what
IO.select does in Ruby itself.
|
|
This will allow users to subclass Kgio::File and
override certain behavior (e.g. overriding "#each").
|
|
This also allows us to return/override #to_path and #path if
necessary, but so far everything works with MRI 1.8, MRI 1.9,
and Rubinius.
|
|
For the case where a file is readable, it's faster to
just call open() instead of stat()-ing and then calling
open().
open() failures are still relatively cheap, too, they're still
more expensive than a failed stat() but cheaper than raising
an exception.
|
|
== 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
|
|
These aren't well-defined semantics...
|
|
This is needed under Ruby trunk if the string is not actually
resized.
|
|
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.
|
|
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
|
|
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>
|
|
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>
|
|
This changes our semantics, but it's unlikely anybody
relies on EINTR right now...
|
|
I didn't know this about mkmf at the time...
|
|
Documenting the new flags options and also improving
style of the existing class overrides.
|
|
Not fun on slow systems, unfortunately...
|
|
|
|
Some systems are slower than others...
|
|
|
|
RubyGems handles it already
|
|
Ruby 1.9.3dev has better support for it
|
|
Another thread may have killed the descriptor.
|
|
Another thread may have killed the acceptor object.
|
|
This allows applications to not rely on global accept4_flags
|
|
Don't force people to rely on global flags, there may be
blocking parts of an otherwise non-blocking program...
|
|
|
|
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.
|
|
Oops, fortunately we allocated too much and not too little.
|
|
It's in Ruby 1.9.3dev and tracks waiting FDs on blocked threads.
|
|
Much nicer this way...
|