Date: Fri, 6 Feb 2004 15:32:43 -0600 From: Dan Nelson <dnelson@allantgroup.com> To: Eric Jacoboni <jaco@scrogneugneu.org> Cc: freebsd-questions@freebsd.org Subject: Re: sem_open(3) and FBSD 5.2 : what the point ? Message-ID: <20040206213243.GG76684@dan.emsphone.com> In-Reply-To: <40240435.3080707@scrogneugneu.org> References: <40240435.3080707@scrogneugneu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Feb 06), Eric Jacoboni said:
> Here's a sample code:
>
> #include <semaphore.h>
...
> 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
> <fcntl.h>.
>
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040206213243.GG76684>
