From: "Iñaki Baz Castillo" <ibc@aliax.net>
To: ruby.posix.mq@librelist.com
Subject: How to set "maxmsg"?
Date: Fri, 8 Jan 2010 00:24:09 +0100 [thread overview]
Message-ID: <201001080024.09491.ibc@aliax.net> (raw)
In-Reply-To: <201001080024.09491.ibc@aliax.net>
I'm trying to set "maxmsg" to 100 (rather than the system default 10). For
this I try:
---------------------------------------
MQ = POSIX_MQ.new(
"/mq", # queue name
IO::RDONLY | IO::CREAT, # read only and force creation
nil, # mode
POSIX_MQ::Attr.new(
0, # flags
100, # maxmsg
8192, # msgsize
0 # curmsgs
)
)
---------------------------------------
But I get an error:
`initialize': Invalid argument - mq_open (Errno::EINVAL)
mq_setattr(3) says that such error occurs when:
EINVAL newattr->mq_flags contained set bits other than O_NONBLOCK.
Well, I'm setting 0 for flags, so what am I doing wrong?
Thanks a lot.
--
Iñaki Baz Castillo <ibc@aliax.net>
next parent reply other threads:[~2010-01-07 23:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-07 23:24 Iñaki Baz Castillo [this message]
2010-01-07 23:31 ` How to set "maxmsg"? [SOLVED] Iñaki Baz Castillo
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=201001080024.09491.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).