Date | Commit message (Collapse) |
|
This provides some extra type safety if combined with other
C extensions, as well as allowing us to account for memory usage of
the HTTP parser in ObjectSpace.
This requires Ruby 1.9.3+ and has remained a stable API since
then. This will become officially supported when Ruby 2.3.0 is
released later this month.
This API has only been documented in doc/extension.rdoc (formerly
README.EXT) in the Ruby source tree since April 2015, r50318
|
|
Apparently POSIX message queues adopted close-on-fork behavior
in FreeBSD at some point. Oh well, somebody else who is more
interested in FreeBSD than can look into fixing it on their end.
Improve exception reporting a bit while we're at it.
|
|
This bug was noticed under FreeBSD :x
|
|
It looks like HTTPS support provided by the Let's Encrypt
project is still going strong, and maybe we can rely on it.
|
|
Email is not private, and we won't be able to protect your
privacy. Anonymity (when desired) should be the sender's
responsibility, not the recipients'.
|
|
This release updates our POSIX_MQ#close to match the idempotent
IO#close behavior under Ruby 2.3 and later. Previous Ruby versions
continue to be supported, but POSIX_MQ#close remains non-idempotent
when built against old Ruby versions.
4 changes since v2.2.0:
enable frozen_string_literal for Ruby 2.3+
support idempotent POSIX_MQ#close
README: remove cgit and ssoma references
build: use '--local' domain for dev gem install
|
|
This avoids unnecessary network requests for disconnected
systems.
|
|
We may not always be cgit, and encouraging tarball snapshot
downloads is a waste of resources
Release tarballs are not, as users aren't expected to know to
do "git clone"; but developers are.
This is also not an appropriate place for advertising ssoma.
|
|
IO#close under Ruby 2.3 is idempotent, we shall follow suit
with POSIX_MQ#close
|
|
No changes for older Rubies, but this reduces garbage under 2.3
|
|
The major feature of this release is the POSIX_MQ.for_fd class
method thanks to Christopher Lord. The addition of the
POSIX_MQ#autoclose? and POSIX_MQ#autoclose= round out the new
feature set. All of the new methods are analogous to their
counterparts in the core IO class.
The mailing list is also moved to ruby-posix-mq@bogomips.org
and no longer requires subscription. Existing librelist
subscribers will need to resubscribe manually (as I have no
way of doing so automatically):
ruby-posix-mq+subscribe@bogomips.org
HTTP archives and instructions for extracting the mail archives
via git are available at:
http://bogomips.org/ruby-posix-mq/
Christopher Lord (1):
Ability to adopt file descriptors
Eric Wong (16):
for_fd: delay assigning to mq->des until after mq_getattr
test_posix_mq: rewrite test to not depend on DL or alarm
support autoclose= and autoclose?
pack rw_args struct
change mailing list to ruby-posix-mq@bogomips.org
doc: remove --sanitize-html option for pandoc
switch documentation to olddoc
LICENSE: allow all future versions of LGPLv3+
favor comparisons against zero instead of -1
pkg.mk: misc tweaks and updates
gemspec: remove rdoc_options setting
.gitignore: add placeholder
gemspec: use SPDX license abbreviation
misc doc updates
POSIX_MQ#autoclose= propagates to IO
GNUmakefile: ordering fix for building gem
|
|
|
|
If a corresponding IO object exists or is created later, propagate
autoclose to the corresponding IO object to avoid simplify autoclose
handling for the user. This hopefully avoids nasty surprises in case
users disable autoclose but want to keep the IO object around.
|
|
* Include the email addresses for olddoc
* README: update support status of Rubies
* label link to mailing list archives
|
|
|
|
|
|
We no longer need it for olddoc
|
|
* We're not using isolate anymore
* support EXTCONF_ARGS env for building
* add "make check" as an alias for "make test"
(muscle memory for GNU-autotools projects)
|
|
This should allow faster instructions to be used in some cases.
Technically this may be less pedantically correct, but there is
enough existing code out there which does the same thing to
discourage kernel/libc developers from overloading negative
return values.
...And glibc even favors comparison against zero, too.
|
|
In case I'm hit by a bus and FSF comes out with an LGPLv4,
the project will still be able to move forward.
While we're at it, update the gemspec, too.
|
|
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.
|
|
Newer versions of pandoc removed this option
|
|
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:
ruby-posix-mq+subscribe@bogomips.org
Similarly, they may unsubscribe via:
ruby-posix-mq+unsubscribe@bogomips.org
HTTP archives are available via:
http://bogomips.org/ruby-posix-mq/
ssoma users may also use: git://bogomips.org/ruby-posix-mq
(see README change)
Old messages to the librelist addresses will continue to
get routed to the new mailing list.
ref: http://public-inbox.org/
|
|
This saves one word of stack space, potentially improving
performance a miniscule amount.
|
|
These are analogous to the identically-named IO methods and useful
when we're inheriting descriptors (or writing tests for inheriting
descriptors).
|
|
DL is removed and deprecated, and we don't actually need
it or alarm to test for EINTR-safety.
|
|
We do not want to assign to mq->des before verifying we
have a valid message queue, otherwise the GC may misclose
an invalid MQ descriptor (which may be a valid FD).
|
|
This patch adds support for adopting an existing file descriptor, together
with testcases. The need for this comes up when we use systemd with the
ListenMessageQueue directive. For socket activation, systemd opens the POSIX
message queue and expects user code to begin using the file descriptor
without opening it in-process.
To support the systemd model in the `posix_mq` gem, this patch suggests
imitating the behavior on the Socket class, which uses `#for_fd` to create a
socket class from a descriptor.
One confounding factor exists. POSIX queues have a name but it is difficult
to get access to this name in a safe manner from the file descriptor. One
option would be to `readlink(2)` on `/proc/self/fd/N` to get the name[1], but
note that if the descriptor is unlinked we wouldn't get anything usable.
Rather than risk incorrect behavior and extra complexity, I've decided to
just raise an `ArgumentError` if `#name` is called on adopted descriptors.
Typically one wouldn't need the actual name in a systemd socket-activated
situation, anyway.
[1]: http://stackoverflow.com/questions/1188757/getting-filename-from-file-descriptor-in-c
[ew: simplified type checks to be consistent with IO.for_fd,
fixed test case]
Signed-off-by: Eric Wong <normalperson@yhbt.net>
|
|
* avoid deprecated rb_thread_blocking_region in Ruby 2.0/2.1
* prepare for rb_thread_blocking_region removal
|
|
This will be removed in Ruby 2.2, so avoid the deprecation warning.
|
|
It'll be OK to use rb_thread_call_without_gvl when
rb_thread_blocking_region is not detectable at all.
We still use rb_thread_blocking_region for Ruby 2.0-2.1 because
rb_thread_call_without_gvl was detectable in 1.9.3, but not
usable as an internal symbol.
ref: https://bugs.ruby-lang.org/issues/9502
|
|
RAA is dead.
|
|
|
|
Blocking methods no longer raise Errno::EINTR (to match
Ruby IO semantics, making code easier to work with).
There are also many FreeBSD-related fixes thanks to
Hleb Valoshka <375gnu@gmail.com> and small code cleanups.
|
|
On my i386-freebsd9 VM, this takes just longer than the
maximum allowable time.
|
|
We need to have -lrt in LDFLAGS before we can detect it.
|
|
|
|
Somehow I mixed up return values for mq_* functions that
return "int". This was noticed on FreeBSD where mqd_t
is NOT an integer.
|
|
Some OSes have ridiculously low boundaries and we don't
want mysterious failures on them
|
|
Blocking functions should not raise Errno::EINTR to match
existing semantics of Ruby IO methods (e.g. IO.select, IO#read,
IO#write). This makes user code easier to read/write.
Like th Ruby methods we emulate, we only reacquire the GVL on
EINTR to fire signal handlers, but otherwise emulate SA_RESTART
semantics.
This is a backwards-incompatible API change (but unlikely
to break existing code).
|
|
Signed-off-by: Eric Wong <normalperson@yhbt.net>
|
|
The 3rd argument of DL::Function.new is ABI type, not a return type.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
|
|
CFLAGS=-Wall somehow got disabled in my Ruby installation...
|
|
Oops
|
|
'*' works just the same
|
|
There is one backwards-incompatible API change:
POSIX_MQ#send returns +true+ on success instead of +nil+
for consistency with POSIX_MQ#trysend.
This release adds the POSIX_MQ#trysend, POSIX_MQ#tryreceive and
POSIX_MQ#tryshift interfaces to avoid exceptions on common
EAGAIN errors for users of non-blocking queues.
Bugfixes: non-blocking behavior changes to a shared descriptor
in a different process are reflected immediately in the child
(this won't fix race conditions in your code, however).
Minor bugfixes for posix-mq-rb(1) and quieted warnings for
1.9.3dev.
|
|
So private we won't mention them in the commit message!
|
|
Something I considered but decided wasn't worth doing.
|
|
This is to be consistent with POSIX_MQ#trysend
|
|
Consider them good enough for a 1.0.0 release
|