From owner-freebsd-questions Thu Jan 18 13:26: 4 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail.astercity.net (smtp.astercity.net [212.76.33.36]) by hub.freebsd.org (Postfix) with ESMTP id B5CA737B401 for ; Thu, 18 Jan 2001 13:25:46 -0800 (PST) Received: from BS.home.astercity.net (unknown [10.13.13.3]) by mail.astercity.net (SECureMail) with ESMTP id 9F9697D509; Thu, 18 Jan 2001 22:25:41 +0100 (CET) Date: Thu, 18 Jan 2001 22:25:41 +0100 (CET) From: Michal Zapasnik X-Sender: bigstar@BS.home.astercity.net To: Mikko Tyolajarvi Cc: freebsd-questions@freebsd.org Subject: Re: System functions in BSD and others *nix systems. In-Reply-To: <200101181901.f0IJ1Le53616@explorer.rsa.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 18 Jan 2001, Mikko Tyolajarvi wrote: > Two of them actually... > > [...] > Yes, right. > >When i run ./one | ./two on FreeBSD i get > > I recive: 671473920 > >and sa on as i wrote on other tested OS it works fine. > > Which is never a guarantee of program correctness :-) > Huh ;] > >Anyone know where the problem is? > > You don't check the return values of any of the msg* function calls, > which may have failed for various reasons. If you do that, you may be > able to find out what is going wrong. > I do as you say , [...] if (msgrcv(q, &msg, sizeof(msg), 0, 0) == -1) { perror("msgrcv"); exit(0); } And i have msgrcv: Invalid argument I check in manual that is the flag [EINVAL] 'msqid is not a valid message queue identifier.' But if why it work on other OS and on FBSD not?, and what is vaild in my queue identifer. -- BS. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message