about summary refs log tree commit homepage
DateCommit message (Collapse)
2017-03-17favor require_relative over require pu
This makes it easier to avoid file name conflicts while also improving startup performance by attempting fewer paths.
2017-03-17epoll: add newline to Kernel#warn messages for atomicity
Relying on the record separator ($\ or "\n") is not atomic on multi-process or multi-threaded systems writing to the same log file or pipe.
2017-03-16drop unused Ruby 1.8 support code
Ruby 1.8 is long dead and we already broke 1.9 support by using keyword args for splice, sendfile, and copy_file_range support.
2017-03-16allow nestable TLS buffers within the same thread
Users may wish to use our epoll or kqueue interfaces within their own app running on a web server or some such. This prevents users from missing events at an increased allocation cost.
2017-03-16free buffer if pthread_setspecific fails
Unlikely, but we must not leak memory if pthread_setspecific somehow fails.
2017-03-11tests: switch to test-unit
test-unit has fewer incompatible changes over the years than minitest; and minitest seems open to making future incompatible changes... Nope. I value API stability more and more as I (and this project) ages.
2017-03-11portability fixes for systems w/o splice, copy_file_range
We need to support FreeBSD, at least.
2017-03-11implement linux_sendfile support
This will also allow non-Linux users to use sendfile if it is not available.
2017-03-02gemspec: use SPDX-compatible license specifier
This makes it easier for automated checkers to check our license.
2017-01-05copy_file_range: move wrapper to Ruby for keyword arg handling
Keyword args allows for a smaller interface for common use, while retaining the capability to use offsets for both input and output. The current (2.4) Ruby C API for keyword args is slow and creates too many garbage objects. As with our splice wrapper, use a pure Ruby wrapper around an internal C function.
2017-01-04remove PIPE_BUF constant definition
This was never in any released version of "sleepy_penguin", and the same information may be queried via the 'etc' extension since Ruby 2.2: require 'etc' IO.pipe { |r, w| w.pathconf(Etc::PC_PIPE_BUF) }
2017-01-04doc: remove references to IO#pipe_size accessor
This is a part of the "io_splice" RubyGem we will not be supporting in "sleepy_penguin".
2017-01-04new API for splice and tee
Since we're breaking away from the old io_splice gem, we have liberty to change the API when moving to a new namespace. This might allow us to simplify the common case args and reduce the amount of C code we maintain.
2017-01-04copy_file_range: use correct syscall numbers on x86/x86-64
I had a recent linux-libc-dev installed with my kernel, so I did not notice these mistakes until I installed only an updated kernel without the headers. The old number (285) is the generic base syscall number.
2017-01-04pkg.mk: various updates from other projects
* remove isolate support, we do not use or need it * allow "make check" as an alias for "make test" This is for muscle-memory compatibility with autotool projects * avoid network access during local gem install
2017-01-02splice: clarification regarding tee() flags
It's not our fault, it's the kernels :P
2017-01-02unify rb_gc() handling for out-of-FD conditions
This should hopefully simplify logic a bit and avoid expensive access to errno.
2017-01-02doc: various URL updates (https)
HTTPS provides some degree of additional security. We'll also document our NNTP mail archive mirror, too. Additionally, this places some additional load on our yahns instance running bogomips.org, meaning additional testing for sleepy_penguin :)
2016-03-15implement copy_file_range support for Linux 4.5+
Under Linux 4.5, this allows for efficient copies and is similar to the splice and sendfile system calls.
2016-03-15support the splice(2) and tee(2) syscalls
Since these are Linux-specific syscalls, it makes sense to include it here. This is taken from the "io_splice" RubyGem, but this may supercede that. Note: this does not include a vmsplice(2) wrapper
2015-12-07note the epoll/io.rb file is only for Ruby 1.8
I was reading the code after a while and wonder why it was still doing archaic things like Time.now... I'm not sure how much longer it's worth supporting 1.8. Maybe the next release can remove it.
2015-06-05epoll: allow :CLOEXEC instead of the long constant
The long constant name conveys no additional info. Since epoll_create1 is rarely called, and a cache lookup for cold code is wasfeful
2015-04-22TODO: add memfd item
memfd looks rather reasonable and non-horrible, so maybe we may implement it more easily (unlike fanotify which requires CAP_SYS_ADMIN).
2015-01-11README: fix wording: are => is
2015-01-11sleepy_penguin 3.4.1 - minor updates v3.4.1
Most notably the mailing list is now subscription-optional on the bogomips.org server: sleepy-penguin@bogomips.org If you want to keep receiving email updates, you'll need to resubscribe by sending a message to: sleepy-penguin+subscribe@bogomips.org Migrating subscribers can't be done automatically as librelist (our old host) doesn't publish subscriber lists. But you don't have to subscribe, either, HTTP archives are available at: http://bogomips.org/sleepy-penguin/ There you'll also find links to ssoma/public-inbox for extracting the mail archives to git. shortlog: test_kqueue_io: add test for deleting items test_inotify: add test for rm_watch extconf: detect inotify_init1 in libc inotify: cleanup Inotify::Event creation switch documentation to olddoc change mailing list to sleepy-penguin@bogomips.org relax license to LGPLv2.1+ (from v2.1 && v3 only) cleanup documentation links and ignores gemspec: add dev dependency on test-unit 3.x README: label the link to the mailing list archives GNUmakefile: drop more RubyForge references README: stop mentioning Rubinius gemspec: use minitest, not test-unit
2015-01-11gemspec: remove dead rdoc_options config
Old wrongdoc cruft, not used in olddoc.
2015-01-11sleepy_penguin 3.4.0 - minor updates v3.4.0
Most notably the mailing list is now subscription-optional on the bogomips.org server: sleepy-penguin@bogomips.org If you want to keep receiving email updates, you'll need to resubscribe by sending a message to: sleepy-penguin+subscribe@bogomips.org Migrating subscribers can't be done automatically as librelist (our old host) doesn't publish subscriber lists. But you don't have to subscribe, either, HTTP archives are available at: http://bogomips.org/sleepy-penguin/ There you'll also find links to ssoma/public-inbox for extracting the mail archives to git. shortlog: test_kqueue_io: add test for deleting items test_inotify: add test for rm_watch extconf: detect inotify_init1 in libc inotify: cleanup Inotify::Event creation switch documentation to olddoc change mailing list to sleepy-penguin@bogomips.org relax license to LGPLv2.1+ (from v2.1 && v3 only) cleanup documentation links and ignores gemspec: add dev dependency on test-unit 3.x README: label the link to the mailing list archives GNUmakefile: drop more RubyForge references README: stop mentioning Rubinius gemspec: use minitest, not test-unit
2015-01-11gemspec: use minitest, not test-unit
Oops, I got mixed up with another project and apparently I did port this over to use minitest. Anyways I don't care much either way.
2015-01-11README: stop mentioning Rubinius
I'm no longer willing to deal with a proprietary bug tracker which requires accepting a Terms-of-Service. If others want to, they can do so on our behalf and send patches/bug reports to either project. Contributing to sleepy_penguin will never require anything more than the ability to send plain-text email.
2015-01-11GNUmakefile: drop more RubyForge references
2015-01-11README: label the link to the mailing list archives
Gah, so similar to the homepage URL...
2015-01-11gemspec: add dev dependency on test-unit 3.x
This is still installed by Ruby, but in case one day it isn't, we'll be ready.
2015-01-11cleanup documentation links and ignores
We no longer have a ChangeLog, prefer to use powerful version control instead.
2015-01-11relax license to LGPLv2.1+ (from v2.1 && v3 only)
In case I'm hit by a bus before the FSF releases the LGPLv4, users may choose to use any newer version of the LGPL.
2015-01-11change mailing list to sleepy-penguin@bogomips.org
The public-inbox + mlmmj setup on bogomips.org allows posting without subscription and offers downloadable archives via git. The lack of rsyncable archives on librelist nowadays and subscription-required nature of librelist are points against it. Repliers are now encouraged to Cc: all recipients (using the reply-all function of their mail client) since many readers are not subscribed. This project has never accepted or encouraged HTML email, but librelist accepted it. The bogomips.org mail server is configured to treat HTML mail as spam, so do not send HTML mail if you expect a response. Users who wish to subscribe may send a message to: sleepy-penguin+subscribe@bogomips.org Similarly, they may unsubscribe via: sleepy-penguin+unsubscribe@bogomips.org HTTP archives are available via: http://bogomips.org/sleepy-penguin/ ssoma users may also use: git://bogomips.org/sleepy-penguin (see README change) Old messages to the librelist addresses will continue to get routed to the new mailing list. ref: http://public-inbox.org/
2015-01-11switch documentation to olddoc
wrongdoc was difficult to maintain because of the tidy-ffi dependency and the HTML5 changes in Darkfish could not be handled well by Tidy. olddoc is superior as it generates leaner HTML which loads faster, requires less scrolling and less processing power to render. Aesthetic comparisons are subjective of course but completely unimportant compared to speed and accessibility. The presence of images and CSS on the old (Darkfish-based) site probably set unreasonable expectations as to my ability and willingness to view such things. No more, the new website is entirely simple HTML which renders well with even the wimpiest browser (hell, olddoc even tries to generate readable raw HTML). ref: http://80x24.org/olddoc/
2014-12-28inotify: cleanup Inotify::Event creation
We'll prefer using rb_str_new2 instead of rb_str_new(...,strlen) to save binary size. While we're at it, explain why we cannot take e->len into account for plain-old rb_str_new.
2014-12-28extconf: detect inotify_init1 in libc
Many systems have inotify_init1 nowadays, so use inotify_init1 if it is available to avoid unnecessary syscalls.
2014-12-27test_inotify: add test for rm_watch
Ugh, unfortunately this seems buggy in some cases, but we need to ensure the regular case works. ref: https://lkml.org/lkml/2007/7/9/3 Subject: inotify_rm_watch() EINVAL race condition for deleted files
2014-02-07test_kqueue_io: add test for deleting items
2013-12-30sleepy_penguin 3.3.0 - fixes and compatibility improvements v3.3.0
Most notably, this fixes memory leaks for any users of inotify reads, epoll/kevent waiting using short-lived thread. Users of long-lived threads for these functions (all Rainbows!, yahns, and zbatery users) are not affected. A fair amount of internal cleanup was necessary for this. Compatibility with non-Linux systems without clock_gettime is improved, thanks to Lin Jen-Shin. Note: the kevent code is not at all optimized and still uses RARRAY_PTR, so it likely sucks under rbx and MRI 2.1. Eric Wong (13): test_epoll: minor compatibility fix for Ruby 2.1.0 avoid RARRAY_PTR usage for Linux-only bits init: avoid redefinition warning for _GNU_SOURCE Rakefile: kill raa_update task util: minor cleanup to favor rb_io_get_io tests: switch to minitest test_epoll: switch test_dup_and_fork to exit! remove all signalfd-related files tests: remove version-dependent FD_CLOEXEC checks work around lack of rb_io_get_io in Rubinius value2timespec: use StringValueCStr for correctness refactor and fix leak from thread-local storage use extconf: avoid unnecessary linkage against libkqueue Lin Jen-Shin (1): Support for broken system without clock_gettime.
2013-12-27extconf: avoid unnecessary linkage against libkqueue
The check for libkqueue may succeed out-of-the-box on Debian systems where libkqueue-dev is installed. However, libkqueue-dev on Debian installs sys/event.h in a non-standard include path (/usr/include/kqueue), so it is not picked up by default and kqueue support is never compiled. So only check for (and link to) libkqueue if we are configured to detect sys/event.h. This should not affect users on *BSD platforms with native kqueue support.
2013-12-27refactor and fix leak from thread-local storage use
Storing heap-allocated memory in __thread is not feasible for a library since it provides no automatic resource de-allocation. This oversight caused rare applications which use short-lived threads for epoll_wait, kevent, or inotify read to leak memory over time. So we refactor everything to use pthread_* thread-local storage APIs instead. While we're at it, we can safely use a common, generic buffer for inotify, epoll, and kevent to avoid running into PTHREAD_KEYS_MAX limitations. These leaks only affected sleepy_penguin v3.2.0 and later, and only applications which use short-lived threads to call epoll_wait, kevent and inotify read.
2013-11-21value2timespec: use StringValueCStr for correctness
rb_inspect is unlikely to put a \0 byte in the middle of a string, but use StringValueCStr anyways just in case to catch potential bugs.
2013-11-21work around lack of rb_io_get_io in Rubinius
https://github.com/rubinius/rubinius/issues/2771
2013-10-19tests: remove version-dependent FD_CLOEXEC checks
Not all versions/implementations of Ruby set FD_CLOEXEC by default. And it is conceivable MRI will disable the current FD_CLOEXEC default out of portability concerns, so we only test that our code matches.
2013-10-19remove all signalfd-related files
They're long disabled, and there's no way for them to work sanely inside any VM/language which supports signal handlers. There's little need, even, as Ruby has a good API for signal handlers and we have eventfd support.
2013-10-19test_epoll: switch test_dup_and_fork to exit!
exit! is preferable for forked processes in tests since exit may fire at_exit handlers for tests depending on which test suite or version of Ruby is loaded. This was problematic in minitest 5.0.8 but not 4.3.2
2013-10-19tests: switch to minitest
Add a compatibility shim in test/helper to avoid noisy warnings with Minitest (out-of-the-box on Ruby 2.0.0) and also Minitest 5. Automated conversion via: perl -i -p -e 's,test/unit,./test/helper,g' test/test_*.rb perl -i -p -e 's,Test::Unit::TestCase,Testcase,g' test/test_*.rb Yes, I prefer Perl for one-liners :P
2013-10-19util: minor cleanup to favor rb_io_get_io
This makes our code slightly smaller on Ruby 1.9+