Date: Sat, 9 May 2009 21:52:37 +0400 From: pluknet <pluknet@gmail.com> To: Lothar Scholz <scholz@scriptolutions.com> Cc: freebsd-arch@freebsd.org Subject: Re: Are named posix semaphores not implemented? Message-ID: <a31046fc0905091052m738a0f6dm6be4f871d83df97f@mail.gmail.com> In-Reply-To: <976698487.20090509182307@scriptolutions.com> References: <976698487.20090509182307@scriptolutions.com>
next in thread | previous in thread | raw e-mail | index | archive | help
2009/5/9 Lothar Scholz <scholz@scriptolutions.com>: > Hello, > > i tried to port a program using PCBSD based on FreeBSD 7.1 > and the small test program > > #include <semaphore> > #include <stdio.h> > #include <fcntl.h> > > int main() { > =A0 sem_t* s =3D sem_open("foobar", O_CREAT|O_EXCL); > =A0 if (s =3D=3D SEM_FAILED) perror("sem_open"); > } > > raises a "bad system call 12" signal > But from the manpage of sem_open tells me that it should > be there since FreeBSD 5.0? > > Please don't tell me that i have to rewrite the code. > First, you should have sem(4) capacity enabled in kernel (via kldload or statically built). It seems you haven't. Second, as already mentioned and per manpage, you must specify an abs. path in the first arg. --=20 wbr, pluknet
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a31046fc0905091052m738a0f6dm6be4f871d83df97f>