From owner-freebsd-questions@FreeBSD.ORG Fri Feb 6 13:32:46 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C569516A4CE for ; Fri, 6 Feb 2004 13:32:46 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id D10D343D45 for ; Fri, 6 Feb 2004 13:32:44 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i16LWhXn062845; Fri, 6 Feb 2004 15:32:43 -0600 (CST) (envelope-from dan) Date: Fri, 6 Feb 2004 15:32:43 -0600 From: Dan Nelson To: Eric Jacoboni Message-ID: <20040206213243.GG76684@dan.emsphone.com> References: <40240435.3080707@scrogneugneu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40240435.3080707@scrogneugneu.org> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.5.1i cc: freebsd-questions@freebsd.org Subject: Re: sem_open(3) and FBSD 5.2 : what the point ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2004 21:32:46 -0000 In the last episode (Feb 06), Eric Jacoboni said: > Here's a sample code: > > #include ... > dis_ping = sem_open("/ping.sem", O_CREAT, 0777, 1); ... > > On FBSD 5.2, gcc first complains it doesn't know about O_CREAT... > That's not what the sem_open() manpage claims but, ok, let's include > . > > The code, then, compile ok, but fails on : > > $ ./ping.exe > zsh: invalid system call (core dumped) ./ping.exe > > Any idea? Have you enabled them in your kernel config? From /sys/conf/NOTES : # p1003_1b_semaphores are very experimental, # user should be ready to assist in debugging if problems arise. options P1003_1B_SEMAPHORES -- Dan Nelson dnelson@allantgroup.com