From: "Iñaki Baz Castillo" <ibc@aliax.net>
To: ruby.posix.mq@librelist.com
Subject: Re: Re: Errno::ENOMEM (but now with no reason)
Date: Sun, 10 Jan 2010 13:18:25 +0100 [thread overview]
Message-ID: <201001101318.25681.ibc@aliax.net> (raw)
In-Reply-To: 20100110055142.GA30655@dcvr.yhbt.net
El Domingo, 10 de Enero de 2010, Eric Wong escribió:
> > In fact, let's say process A is readin in /mq and B is writting there.
> > I delete /mq (with POSIX_MQ.unlink or by deleting /mnt/mqueue/mq) and A
> > still can write and B still reads what A writes.
>
> Hi Iñaki,
>
> mq_unlink(3) and the normal unlink(2) system calls are very similar. if
> another process has the queue open, the queue stays alive until the last
> process with the queue open closes it. So what you're seeing is
> expected behavior (see the mq_unlink(3) manpage or the POSIX_MQ#unlink
> RDoc).
>
> Continuing to use an open but unlinked file is common in Unix
> applications. This naturally extends to message queues as well.
Yes, I expected it.
> > So IMHO it's not a memory allocation problem (it didn't make sense it to
> > be) but other kind of problem (trying to create a queue that still is in
> > use even if it was "theorically" deleted). Could it be detected?
>
> Actually, it is a memory allocation problem. "ulimit -q" is for the
> user and all processes the they own. On Linux, the getrlimit(2) manpage
> (under RLIMIT_MSGQUEUE) documents this behavior.
So, the problem I was experimenting was because I tried to create a new mqueue
when the previous one still existed (even if it was unlinked).
Ok, thanks a lot for your explanation.
--
Iñaki Baz Castillo <ibc@aliax.net>
prev parent reply other threads:[~2010-01-10 12:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-10 1:21 Errno::ENOMEM (but now with no reason) Iñaki Baz Castillo
2010-01-10 1:38 ` Iñaki Baz Castillo
2010-01-10 1:47 ` Iñaki Baz Castillo
2010-01-10 5:51 ` Eric Wong
2010-01-10 12:18 ` Iñaki Baz Castillo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/ruby_posix_mq/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201001101318.25681.ibc@aliax.net \
--to=ibc@aliax.net \
--cc=ruby.posix.mq@librelist.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/ruby_posix_mq.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).