Date | Commit message (Collapse) |
|
Remove the VERSION constant, it's cruft.
|
|
Oops
|
|
These are kinder and less exceptional than their
non-trying counterparts as generating exceptions
is expensive for common EAGAIN errors.
|
|
It can be local variable
|
|
It could work...
|
|
Oops :x
|
|
It's only available when compiled with libffi.
|
|
These flags can be changed in the parent or child
process, so we will always have to run mq_getattr()
to check it. This removes the GVL-keeping non-blocking
optimizations but we'll gain some soon.
|
|
|
|
DL in Ruby 1.9 isn't the same
|
|
This release now works for systems other than Linux and FreeBSD
that support POSIX message queues. This is usable for systems
without mq_timedsend() or mq_timedreceive() but with the
non-timed variants (timeouts wont work).
Thanks to Tadeusz Bochan for testing.
Ruby posix_mq is now dual-licensed under the GPLv2 (as well as the
preferred LGPLv3) for compatibility with existing GPLv2-only code.
|
|
|
|
For completeness, the LGPLv3 remains the preferred license.
|
|
Maybe people will just upgrade to newer systems eventually.
|
|
If it's not clear, we hate HTML.
|
|
ref: http://mid.gmane.org/AANLkTimNcWKqNSbD5GL76Z9rS3Gfi3uGusPksD2Eo+=P@mail.gmail.com
|
|
POSIX_MQ#notify(&block) mostly sucks.
|
|
No need to waste indentation and make eyes wander.
|
|
Some systems without mq_timedsend/mq_timedreceive need to
use alarm() or similar (setitimer()) to interrupt timed-out
mq_send/mq_receive calls, so we need to handle EINTR properly.
|
|
While the old URLs still work, bogomips.org went on a URL diet
|
|
These cannot be cast to void since its value is
meaningful.
|
|
Not all systems can convert POSIX_MQ to IO objects.
|
|
This makes us explicitly compatible with GPLv2-only programs.
|
|
Some ancient systems don't support mq_timedsend and
mq_timedreceive but somehow manage to support other POSIX
mq_* functions.
|
|
It's all standard C library stuff.
|
|
RSTRING_PTR may contain '\0' bytes which makes it unsuitable
for mq_unlink() and mq_open()
|
|
This was too aggressively deleted during cleanups for Rubinius
support in commit 5339d9d693c794c0f20270d5726cb360e31dff30
Noticed-by: Tadeusz Bochan <tad.bochan@bnpparibas.com>
ref: 2a92695fc1958e0370782284c6196625@ruby-forum.com
|
|
Apparently there are OSes that don't have methods to convert
mqd_t to FD.
Noticed-by: Tadeusz Bochan <tad.bochan@bnpparibas.com>
ref: <2a92695fc1958e0370782284c6196625@ruby-forum.com>
|
|
I can't stand Rake :x
|
|
Run it by default on releases.
|
|
Rubinius 1.2 as well as Ruby 1.9. Ruby 1.8 works except it will
block the entire interpreter for blocking operations. Spurious
errors during GC for POSIX_MQ#to_io users are now avoided.
|
|
No more JavaScript on our site!
|
|
Cleaner code, too, no more direct RSTRUCT usage.
|
|
StringValuePtr should already be a sufficient guard.
There are more tests while we're at it, too, and we'll
now raise TypeError instead of ArgumentError when a
POSIX_MQ::Attr is not passed properly.
|
|
This function isn't exported in the standard Ruby headers,
it returns an aggregate value and isn't available in Rubinius,
either, so nuke it.
While we're at it, use clock_gettime() instead of gettimeofday()
to avoid unnecessary timeval usage since mq_send/mq_receive
rely on higher-precision timespecs instead.
|
|
I did not know about this method back in the day...
|
|
We shouldn't unnecessarily hog system resources.
|
|
It can be dangerous to hit (and ignore) EBADF errors in
multi-threaded applications. Users of POSIX_MQ#to_io have two
Ruby objects pointing to the same file descriptor, making
things tricky when it comes time to reap resources.
We'll always prefer to close the Ruby IO object if it exists
(because we have less control over its GC behavior) and
ignore the raw descriptor.
|
|
On ENOMEM, EMFILE, and ENFILE errors, it is customary to
invoke the Ruby GC and free up resources and retry the
system call.
|
|
Fix POSIX_MQ#notify(&block) usage, this regression was
introduced in 0.4.0 and our tests for it were broken, as well.
|
|
tests for them were stupidly broken and never executed :x
|
|
Uncommonly raised exceptions due to programmer error are now
raised more safely with respect to the MRI garbage collector.
The "posix-mq.rb" executable has been renamed to "posix-mq-rb"
to respect RPS and is also hopefully easier to type/read when
used in scripts. I'm preserving the "rb" in the name since I
hope to have a more portable, C-only version someday.
Minor cleanups and documentation now uses RDoc 2.5.x
|
|
|
|
".rb" in the executable name is discouraged by the
{Ruby packaging standard}[http://github.com/chneukirchen/rps]
and probably confusing.
If I ever get around to it, a non-Ruby version of this
executable is planned, and that will be called "posix-mq"
|
|
Avoid the RSTRING_PTR(rb_inspect(val)) construct, as it may not
preserve the value of rb_inspect() on the stack.
|
|
Instead of blindly defining a module, this is more flexible in
case Signal in Ruby itself becomes something other than a
module.
|
|
Small bugfixes and small API changes to avoid potential
issues/misuse are the focus of this release.
For non-blocking operation, the GVL is no longer bounced. This
reduces synchronization/scheduling overhead when used in
non-blocking applications.
Small cleanups and documentation improvements, too.
* make POSIX_MQ#dup and POSIX_MQ#clone no-op
* do not release GVL for non-blocking operations
* do not release GVL when unlinking/opening
* POSIX_MQ#<< does not release GVL when non-blocking
* avoid shadow warnings
* README: add mailing list archives info
* POSIX_MQ#to_io works under FreeBSD, too
* fix potential race with notify(&block)
* add TODO item for using netlink under Linux
* remove non-portable #warning CPP directive
* ensure POSIX_MQ#name is clobber-proof
|
|
We don't want folks to accidentally clobber the value for
others, so allocate a new string object for it (don't worry,
rb_str_dup() is cheap in 1.9).
|
|
There's a good chance they're not using GCC if they're on some
weird platform that we'd emit a warning for.
|
|
|