From: tad.bochan@externe.bnpparibas.com
To: ruby.posix.mq@librelist.com
Subject: [ruby.posix.mq] Réf. : Welcome to ruby.posix.mq list.
Date: Wed, 23 Feb 2011 13:11:39 +0100 [thread overview]
Message-ID: <OF2AAA37FA.71EF7F76-ONC1257840.0041E41E-C1257840.0042FC71@bnpparibas.com> (raw)
In-Reply-To: OF2AAA37FA.71EF7F76-ONC1257840.0041E41E-C1257840.0042FC71@bnpparibas.com
Hello Eric,
Ref: http://www.ruby-forum.com/topic/1124434#983255
FYI. These are the mq_* entry points in the HPUX librt.sl
>/home/acore/workarea/tb/www# nm /usr/lib/librt.sl | grep mq_ | grep entry
mq_close | 15288|extern|entry |
mq_getattr | 15376|extern|entry |
mq_notify | 15464|extern|entry |
mq_open | 15552|extern|entry |
mq_receive | 15640|extern|entry |
mq_send | 15728|extern|entry |
mq_setattr | 15816|extern|entry |
mq_unlink | 15904|extern|entry |
In my clumsy version of this from 4 years ago, I used the system call,
alarm
require "dl"
LIBC=DL.dlopen("/usr/lib/libc.sl")
ALARM=LIBC["alarm","II"]
.
.
.
def receive
ALARM[@maxtime] # SET TIMEOUT
trap("ALRM") {puts "Got Alarm!"}
begin
msgpri=[@priority].pack("L")
rc=syscall(SYS_mq_receive, @qid , @buf, @buf.length, msgpri)
rescue SignalException
signame="#{$!}"
@buf[0,(rc=7)]= signame
puts "Unwanted Signal : #{signame}" unless signame ==
"SIGALRM"
raise unless signame == "SIGALRM"
end
@priority = msgpri.unpack("L").first
return @buf[0,rc]
end
This message and any attachments (the "message") is
intended solely for the addressees and is confidential.
If you receive this message in error, please delete it and
immediately notify the sender. Any use not in accord with
its purpose, any dissemination or disclosure, either whole
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message.
BNP PARIBAS (and its subsidiaries) shall (will) not
therefore be liable for the message if modified.
Do not print this message unless it is necessary,
consider the environment.
---------------------------------------------
Ce message et toutes les pieces jointes (ci-apres le
"message") sont etablis a l'intention exclusive de ses
destinataires et sont confidentiels. Si vous recevez ce
message par erreur, merci de le detruire et d'en avertir
immediatement l'expediteur. Toute utilisation de ce
message non conforme a sa destination, toute diffusion
ou toute publication, totale ou partielle, est interdite, sauf
autorisation expresse. L'internet ne permettant pas
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce
message, dans l'hypothese ou il aurait ete modifie.
N'imprimez ce message que si necessaire,
pensez a l'environnement.
next parent reply other threads:[~2011-02-23 12:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-23 12:11 tad.bochan [this message]
2011-02-23 20:15 ` [ruby.posix.mq] Réf. : Welcome to ruby.posix.mq list Eric Wong
2011-02-23 21:54 ` Tad Bochan
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=OF2AAA37FA.71EF7F76-ONC1257840.0041E41E-C1257840.0042FC71@bnpparibas.com \
--to=tad.bochan@externe.bnpparibas.com \
--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).