From owner-freebsd-arch@FreeBSD.ORG Sat May 9 18:20:53 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76EB0106566B for ; Sat, 9 May 2009 18:20:53 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-fx0-f216.google.com (mail-fx0-f216.google.com [209.85.220.216]) by mx1.freebsd.org (Postfix) with ESMTP id 061208FC22 for ; Sat, 9 May 2009 18:20:52 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by fxm12 with SMTP id 12so1953402fxm.43 for ; Sat, 09 May 2009 11:20:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=HwUn9klcNL18eVbBPMejbkm/dNFsX7PjF27PYsmRqnc=; b=Y2e8YIR6JTxj+ohZ0wYIEG8vuGfzXYTr8eVuGe+RE2QAJTv3JjqHGq5pePeajicRjP Gc3ggiRvHza8sbGnJdRp3WABURAvyGLEJU51z1FuszMWPjsYVzLr+u4lJt13wCSYXUIU 59F8z3JWSEYhrAxNd9/OF3+KDnJ3dMKEUeLLs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=ZT3C0gTE4Fym6sNrYVuvnxOxyxr+I3k2d4Wt8/G3Fc9etqvGoupcFCiaKHaVu23fnh LRdzBnCwtQ0xRwgRdCfqeD0Gx2r5Ar4eBY89URBOPgF5fhj3tK+7UuzlQHFio7m9EKEv 9RbelDxxbnu0Meax18OLqOeHuSl9RnNfOfq3I= MIME-Version: 1.0 Received: by 10.103.223.2 with SMTP id a2mr2774080mur.88.1241891557334; Sat, 09 May 2009 10:52:37 -0700 (PDT) In-Reply-To: <976698487.20090509182307@scriptolutions.com> References: <976698487.20090509182307@scriptolutions.com> Date: Sat, 9 May 2009 21:52:37 +0400 Message-ID: From: pluknet To: Lothar Scholz Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-arch@freebsd.org Subject: Re: Are named posix semaphores not implemented? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2009 18:20:53 -0000 2009/5/9 Lothar Scholz : > Hello, > > i tried to port a program using PCBSD based on FreeBSD 7.1 > and the small test program > > #include > #include > #include > > 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