From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rajat Jain Subject: Re: Detecting whether a Message Queue with a given qid exists? Date: Wed, 2 Nov 2005 12:00:50 +0900 Message-ID: References: <6a00c8d50510302330m193cdc91v93b745be3b2f456f@mail.gmail.com> <6a00c8d50511010111r23756139i92f675a3a865e69@mail.gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7BIT Return-path: In-Reply-To: <6a00c8d50511010111r23756139i92f675a3a865e69@mail.gmail.com> Content-Disposition: inline Sender: linux-c-programming-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="us-ascii" To: Steve Graegert Cc: linux-c-programming@vger.kernel.org > > Try msgctl with the IPC_STAT command: > > #include > int msgctl(int msqid, int cmd, struct msqid_ds *buf); > > If the queue ID is not valid this call fails with EINVAL and buf is not filled. > > \Steve > Thanks a lot. I think it would solve my problem :-)