From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6939 64.71.128.0/18 X-Spam-Status: No, score=-0.4 required=3.0 tests=AWL,BAYES_00, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=ham version=3.3.2 Path: news.gmane.org!not-for-mail From: tad.bochan@externe.bnpparibas.com Newsgroups: gmane.comp.lang.ruby.posix-mq.general Subject: =?utf-8?b?W3J1YnkucG9zaXgubXFdIFLDqWYuIDogIFdlbGNvbWUgdG8gcnVieS5wb3NpeC5t?= =?utf-8?b?cSBsaXN0Lg==?= Date: Wed, 23 Feb 2011 13:11:39 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: dough.gmane.org 1298463364 13805 80.91.229.12 (23 Feb 2011 12:16:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 23 Feb 2011 12:16:04 +0000 (UTC) To: ruby.posix.mq@librelist.com Original-X-From: ruby.posix.mq@librelist.com Wed Feb 23 13:16:00 2011 Return-path: Envelope-to: gclrpg-ruby.posix.mq@m.gmane.org List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Precedence: list Original-Sender: ruby.posix.mq@librelist.com Xref: news.gmane.org gmane.comp.lang.ruby.posix-mq.general:63 Archived-At: Received: from zedshaw.xen.prgmr.com ([64.71.167.205]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PsDdP-00066r-5j for gclrpg-ruby.posix.mq@m.gmane.org; Wed, 23 Feb 2011 13:15:59 +0100 Received: from zedshaw.xen.prgmr.com (localhost [IPv6:::1]) by zedshaw.xen.prgmr.com (Postfix) with ESMTP id 970D621C120 for ; Wed, 23 Feb 2011 12:15:54 +0000 (UTC) Content-Transfer-Encoding: 7bit X-Content-Filtered-By: PublicInbox::Filter 0.0.1 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.