From owner-freebsd-arch@FreeBSD.ORG Mon May 4 11:07:41 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 B9615106566C for ; Mon, 4 May 2009 11:07:41 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8BE0D8FC0A for ; Mon, 4 May 2009 11:07:41 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n44B7fFx098401 for ; Mon, 4 May 2009 11:07:41 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n44B7eeU098367 for freebsd-arch@FreeBSD.org; Mon, 4 May 2009 11:07:40 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 4 May 2009 11:07:40 GMT Message-Id: <200905041107.n44B7eeU098367@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-arch@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-arch@FreeBSD.org 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: Mon, 04 May 2009 11:07:41 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/120749 arch [request] Suggest upping the default kern.ps_arg_cache 1 problem total. From owner-freebsd-arch@FreeBSD.ORG Wed May 6 16:38:33 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 A117B106566B for ; Wed, 6 May 2009 16:38:33 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id D9F068FC14 for ; Wed, 6 May 2009 16:38:32 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA14456 for ; Wed, 06 May 2009 19:24:04 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4A01B9A3.2030806@icyb.net.ua> Date: Wed, 06 May 2009 19:24:03 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.21 (X11/20090406) MIME-Version: 1.0 To: freebsd-arch@FreeBSD.org X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: shutdown_nice during boot 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: Wed, 06 May 2009 16:38:33 -0000 First, let me simply paste the whole body of shutdown_nice function: void shutdown_nice(int howto) { shutdown_howto = howto; /* Send a signal to init(8) and have it shutdown the world */ if (initproc != NULL) { PROC_LOCK(initproc); psignal(initproc, SIGINT); PROC_UNLOCK(initproc); } else { /* No init(8) running, so simply reboot */ boot(RB_NOSYNC); } return; } Now, initproc is initialized quite early during boot to make sure that PID of 1 is reserved for init. Actual init process is executed at the very end of boot. Right after init is forked it ignores all signals because this is how proc0 is set up. Only when it is actually executed it explicitly re-enables signals and installs certain handlers. Because of the above there is a time frame where initproc != NULL but any signal for init gets ignored. There are not many places where shutdown_nice can be called during that time frame, but I think that there are some. Very unlikely, but theoretically possible situation: a system starts overheating immediately after power on, acpi_tz driver detects this and calls shutdown_nice at the wrong time, the system keeps booting up and eventually melts down. It may be possible to make sure that shutdown_nice is never called at the wrong time by tweaking all the places where it's used. But maybe there is a way to make shutdown_nice behave in a usual way even during that inconvenient timeframe. It's possible to re-enable SIGINT right after init is forked, but this way it will be delivered to init before it installs signal handlers and thus init would simply terminate resulting in "Going nowhere without my init!" panic. Please share your ideas. Thank you! -- Andriy Gapon From owner-freebsd-arch@FreeBSD.ORG Thu May 7 08:03:55 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 E3833106564A for ; Thu, 7 May 2009 08:03:55 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 3013F8FC14 for ; Thu, 7 May 2009 08:03:54 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA23499; Thu, 07 May 2009 11:03:45 +0300 (EEST) (envelope-from avg@icyb.net.ua) Received: from localhost.topspin.kiev.ua ([127.0.0.1] helo=edge.pp.kiev.ua) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1M1ya1-000OTc-Hr; Thu, 07 May 2009 11:03:45 +0300 Message-ID: <4A0295E0.4020609@icyb.net.ua> Date: Thu, 07 May 2009 11:03:44 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.21 (X11/20090406) MIME-Version: 1.0 To: peterjeremy@optushome.com.au References: <4A01B9A3.2030806@icyb.net.ua> <20090507080048.GA64648@server.vk2pj.dyndns.org> In-Reply-To: <20090507080048.GA64648@server.vk2pj.dyndns.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: freebsd-arch@freebsd.org Subject: Re: shutdown_nice during boot 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: Thu, 07 May 2009 08:03:56 -0000 on 07/05/2009 11:00 peterjeremy@optushome.com.au said the following: > On 2009-May-06 19:24:03 +0300, Andriy Gapon wrote: >> It's possible to re-enable SIGINT right after init is forked, but >> this way it will be delivered to init before it installs signal >> handlers and thus init would simply terminate resulting in "Going >> nowhere without my init!" panic. > > The best option would seem to be for init(8) to call sigprocmask(2) > immediately it starts up and block all signals. But a signal still can be delivered after init is exec-ed and before sigprocmask(2) is called or not? > This causes signals > to be deferred until they are unblocked. Once it sorts out its signal > handlers, it can then unblock the signals - at which point it will > receive any signals that were sent in the interim. > > Note that I haven't looked into init(8) to see if there are other > reasons why this approach would not be appropriate > -- Andriy Gapon From owner-freebsd-arch@FreeBSD.ORG Thu May 7 12:16:40 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 CEA141065672 for ; Thu, 7 May 2009 12:16:40 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from fallbackmx06.syd.optusnet.com.au (fallbackmx06.syd.optusnet.com.au [211.29.132.8]) by mx1.freebsd.org (Postfix) with ESMTP id 390EC8FC2E for ; Thu, 7 May 2009 12:16:39 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail35.syd.optusnet.com.au (mail35.syd.optusnet.com.au [211.29.133.51]) by fallbackmx06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n4780sZ6004182 for ; Thu, 7 May 2009 18:00:54 +1000 Received: from server.vk2pj.dyndns.org (c122-106-216-167.belrs3.nsw.optusnet.com.au [122.106.216.167]) by mail35.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n4780oj0013166 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 7 May 2009 18:00:51 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id n4780nfO064675; Thu, 7 May 2009 18:00:49 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id n4780mu8064674; Thu, 7 May 2009 18:00:48 +1000 (EST) (envelope-from peter) Date: Thu, 7 May 2009 18:00:48 +1000 From: peterjeremy@optushome.com.au To: Andriy Gapon Message-ID: <20090507080048.GA64648@server.vk2pj.dyndns.org> References: <4A01B9A3.2030806@icyb.net.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yrj/dFKFPuw6o+aM" Content-Disposition: inline In-Reply-To: <4A01B9A3.2030806@icyb.net.ua> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.19 (2009-01-05) Cc: freebsd-arch@freebsd.org Subject: Re: shutdown_nice during boot 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: Thu, 07 May 2009 12:16:44 -0000 --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2009-May-06 19:24:03 +0300, Andriy Gapon wrote: >It's possible to re-enable SIGINT right after init is forked, but >this way it will be delivered to init before it installs signal >handlers and thus init would simply terminate resulting in "Going >nowhere without my init!" panic. The best option would seem to be for init(8) to call sigprocmask(2) immediately it starts up and block all signals. This causes signals to be deferred until they are unblocked. Once it sorts out its signal handlers, it can then unblock the signals - at which point it will receive any signals that were sent in the interim. Note that I haven't looked into init(8) to see if there are other reasons why this approach would not be appropriate --=20 Peter Jeremy --yrj/dFKFPuw6o+aM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAkoClTAACgkQ/opHv/APuIcA2wCeMnmQxUVK1t+H8+A8fBtoSowA Xo0AnRSxZ8wAqcee8IEixjTvWr4LneA5 =MSGv -----END PGP SIGNATURE----- --yrj/dFKFPuw6o+aM-- From owner-freebsd-arch@FreeBSD.ORG Thu May 7 22:26:08 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16B8E1065673 for ; Thu, 7 May 2009 22:26:08 +0000 (UTC) (envelope-from lauren@rhodamine.com.au) Received: from rhodamine.com.au (dsl-210-15-212-138-static.VIC.netspace.net.au [210.15.212.138]) by mx1.freebsd.org (Postfix) with ESMTP id 40E038FC18 for ; Thu, 7 May 2009 22:26:07 +0000 (UTC) (envelope-from lauren@rhodamine.com.au) Received: by rhodamine.com.au (Postfix, from userid 1036) id 2FF3E218C55F; Fri, 8 May 2009 07:49:24 +1000 (EST) To: arch@freebsd.org From: received@postcard.org Message-Id: <20090507214924.2FF3E218C55F@rhodamine.com.au> Date: Fri, 8 May 2009 07:49:24 +1000 (EST) MIME-Version: 1.0 Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: You have just received a virtual postcard from a friend ! 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: Thu, 07 May 2009 22:26:08 -0000 You have just received a virtual postcard from a friend ! . You can pick up your postcard at the following web address: . [1]http:.exe . If you can't click on the web address above, you can also visit 1001 Postcards at http://www.postcards.org/postcards/ and enter your pickup code, which is: d21-sea-sunset . (Your postcard will be available for 60 days.) . Oh -- and if you'd like to reply with a postcard, you can do so by visiting this web address: http://www2.postcards.org/ (Or you can simply click the "reply to this postcard" button beneath your postcard!) . We hope you enjoy your postcard, and if you do, please take a moment to send a few yourself! . Regards, 1001 Postcards http://www.postcards.org/postcards/ References 1. http://85.17.150.185/~paco/postcard.gif.exe From owner-freebsd-arch@FreeBSD.ORG Sat May 9 16:48:46 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 BFE4B106566C for ; Sat, 9 May 2009 16:48:46 +0000 (UTC) (envelope-from scholz@scriptolutions.com) Received: from dd17920.kasserver.com (dd17920.kasserver.com [85.13.138.236]) by mx1.freebsd.org (Postfix) with ESMTP id 82E948FC12 for ; Sat, 9 May 2009 16:48:46 +0000 (UTC) (envelope-from scholz@scriptolutions.com) Received: from X64SSD (unknown [222.123.80.238]) by dd17920.kasserver.com (Postfix) with ESMTP id 485A5182AA130 for ; Sat, 9 May 2009 18:24:19 +0200 (CEST) Date: Sat, 9 May 2009 18:23:07 +0200 From: Lothar Scholz X-Mailer: The Bat! (v3.62.08) Professional Organization: Scriptolutions X-Priority: 3 (Normal) Message-ID: <976698487.20090509182307@scriptolutions.com> To: freebsd-arch@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Are named posix semaphores not implemented? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Lothar Scholz 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 16:48:47 -0000 Hello, i tried to port a program using PCBSD based on FreeBSD 7.1 and the small test program #include #include #include int main() { sem_t* s = sem_open("foobar", O_CREAT|O_EXCL); if (s == 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. -- Best regards, Lothar Scholz mailto:scholz@scriptolutions.com From owner-freebsd-arch@FreeBSD.ORG Sat May 9 17:42:36 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 4A2AB106566B for ; Sat, 9 May 2009 17:42:36 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout3.freenet.de (mout3.freenet.de [IPv6:2001:748:100:40::2:5]) by mx1.freebsd.org (Postfix) with ESMTP id D92B18FC19 for ; Sat, 9 May 2009 17:42:35 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from [195.4.92.21] (helo=11.mx.freenet.de) by mout3.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #88) id 1M2qZG-0001OF-Mx; Sat, 09 May 2009 19:42:34 +0200 Received: from c-76-103-209-219.hsd1.ca.comcast.net ([76.103.209.219]:33101 helo=lap.jennejohn.org) by 11.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #79) id 1M2qZG-00006h-78; Sat, 09 May 2009 19:42:34 +0200 Date: Sat, 9 May 2009 19:42:31 +0200 From: Gary Jennejohn To: Lothar Scholz Message-ID: <20090509194231.57543f41@lap.jennejohn.org> In-Reply-To: <976698487.20090509182307@scriptolutions.com> References: <976698487.20090509182307@scriptolutions.com> X-Mailer: Claws Mail 3.7.1 (GTK+ 2.14.7; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Reply-To: gary.jennejohn@freenet.de 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 17:42:36 -0000 On Sat, 9 May 2009 18:23:07 +0200 Lothar Scholz wrote: > Hello, > > i tried to port a program using PCBSD based on FreeBSD 7.1 > and the small test program > > #include > #include > #include > > int main() { > sem_t* s = sem_open("foobar", O_CREAT|O_EXCL); > if (s == 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. > According to the man page name MUST start with '/'. --- Gary Jennejohn From owner-freebsd-arch@FreeBSD.ORG Sat May 9 18:01:32 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 57A401065670 for ; Sat, 9 May 2009 18:01:32 +0000 (UTC) (envelope-from scholz@scriptolutions.com) Received: from dd17920.kasserver.com (dd17920.kasserver.com [85.13.138.236]) by mx1.freebsd.org (Postfix) with ESMTP id 17F068FC0A for ; Sat, 9 May 2009 18:01:32 +0000 (UTC) (envelope-from scholz@scriptolutions.com) Received: from X64SSD (unknown [222.123.80.238]) by dd17920.kasserver.com (Postfix) with ESMTP id 3F523181B4036; Sat, 9 May 2009 20:01:29 +0200 (CEST) Date: Sat, 9 May 2009 19:59:54 +0200 From: Lothar Scholz X-Mailer: The Bat! (v3.62.08) Professional Organization: Scriptolutions X-Priority: 3 (Normal) Message-ID: <892763905.20090509195954@scriptolutions.com> To: Gary Jennejohn In-Reply-To: <20090509194231.57543f41@lap.jennejohn.org> References: <976698487.20090509182307@scriptolutions.com> <20090509194231.57543f41@lap.jennejohn.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-arch@freebsd.org Subject: Re[2]: Are named posix semaphores not implemented? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Lothar Scholz 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:01:32 -0000 Hello Gary, GJ> According to the man page name MUST start with '/'. Thanks, but this is not the problem. -- Best regards, Lothar Scholz mailto:scholz@scriptolutions.com From owner-freebsd-arch@FreeBSD.ORG Sat May 9 18:18:44 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 22A6A1065673 for ; Sat, 9 May 2009 18:18:44 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id B250C8FC18 for ; Sat, 9 May 2009 18:18:43 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id C3BB71CDE9; Sat, 9 May 2009 20:18:42 +0200 (CEST) Date: Sat, 9 May 2009 20:18:42 +0200 From: Ed Schouten To: Lothar Scholz Message-ID: <20090509181842.GB58540@hoeg.nl> References: <976698487.20090509182307@scriptolutions.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pCBpnpYZ3zWUlzNh" Content-Disposition: inline In-Reply-To: <976698487.20090509182307@scriptolutions.com> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: FreeBSD Arch 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:18:44 -0000 --pCBpnpYZ3zWUlzNh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Lothar Scholz wrote: > raises a "bad system call 12" signal =46rom sem(4): options P1003_1B_SEMAPHORES --=20 Ed Schouten WWW: http://80386.nl/ --pCBpnpYZ3zWUlzNh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkoFyQIACgkQ52SDGA2eCwUZIACfRSgUPeF3/cpa/sFIUn457esn 52cAnRFJwrpu5VRKERSknVOXDv9zvLEt =YLNG -----END PGP SIGNATURE----- --pCBpnpYZ3zWUlzNh-- 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 From owner-freebsd-arch@FreeBSD.ORG Sat May 9 18:25:29 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 85A7E1065676 for ; Sat, 9 May 2009 18:25:29 +0000 (UTC) (envelope-from jille@quis.cx) Received: from istud.quis.cx (ip83-113-174-82.adsl2.static.versatel.nl [82.174.113.83]) by mx1.freebsd.org (Postfix) with ESMTP id 44DAE8FC14 for ; Sat, 9 May 2009 18:25:29 +0000 (UTC) (envelope-from jille@quis.cx) Received: from [192.168.1.4] (ille [192.168.1.4]) by istud.quis.cx (Postfix) with ESMTP id A516C5C20; Sat, 9 May 2009 20:09:16 +0200 (CEST) Message-ID: <4A05C6CA.1080104@quis.cx> Date: Sat, 09 May 2009 20:09:14 +0200 From: Jille Timmermans User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Lothar Scholz References: <976698487.20090509182307@scriptolutions.com> In-Reply-To: <976698487.20090509182307@scriptolutions.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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:25:29 -0000 Lothar Scholz schreef: > Hello, > > i tried to port a program using PCBSD based on FreeBSD 7.1 > and the small test program > > #include > #include > #include > > int main() { > sem_t* s = sem_open("foobar", O_CREAT|O_EXCL); > if (s == 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. > > Have you removed "options SYSVSEM" from your kernel configuration ? -- Jille From owner-freebsd-arch@FreeBSD.ORG Sat May 9 18:33:19 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 791D9106566C for ; Sat, 9 May 2009 18:33:19 +0000 (UTC) (envelope-from scholz@scriptolutions.com) Received: from dd17920.kasserver.com (dd17920.kasserver.com [85.13.138.236]) by mx1.freebsd.org (Postfix) with ESMTP id 3C74E8FC0A for ; Sat, 9 May 2009 18:33:18 +0000 (UTC) (envelope-from scholz@scriptolutions.com) Received: from X64SSD (unknown [222.123.80.238]) by dd17920.kasserver.com (Postfix) with ESMTP id 1CA35181B39B7 for ; Sat, 9 May 2009 20:33:16 +0200 (CEST) Date: Sat, 9 May 2009 20:31:15 +0200 From: Lothar Scholz X-Mailer: The Bat! (v3.62.08) Professional Organization: Scriptolutions X-Priority: 3 (Normal) Message-ID: <588815840.20090509203115@scriptolutions.com> To: freebsd-arch@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Posix shared memory problem X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Lothar Scholz 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:33:19 -0000 Hello, Thanks for solving the posix semaphore problem. But with shared memory there comes the next issue: int main() { int m; shm_unlink("/barfoo"); m = shm_open("/barfoo", O_RDWR|O_CREAT|O_EXCL, S_IRWXU); if (m == 1) perror("shm_open error"); } i always get permission denied error, and i tried many values for flags and mode? I can only get this working as root but not as a normal user. -- Best regards, Lothar Scholz mailto:scholz@scriptolutions.com From owner-freebsd-arch@FreeBSD.ORG Sat May 9 18:36:06 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 3B647106566C for ; Sat, 9 May 2009 18:36:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id CF1FB8FC0C for ; Sat, 9 May 2009 18:36:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1M2qzN-0000mY-OE; Sat, 09 May 2009 21:09:33 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n49I9UDo069668 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 9 May 2009 21:09:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n49I9Upk055235; Sat, 9 May 2009 21:09:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n49I9UeE055234; Sat, 9 May 2009 21:09:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 9 May 2009 21:09:30 +0300 From: Kostik Belousov To: Lothar Scholz Message-ID: <20090509180930.GN1948@deviant.kiev.zoral.com.ua> References: <976698487.20090509182307@scriptolutions.com> <20090509194231.57543f41@lap.jennejohn.org> <892763905.20090509195954@scriptolutions.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Y8IEA2AKDLXNckrV" Content-Disposition: inline In-Reply-To: <892763905.20090509195954@scriptolutions.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1M2qzN-0000mY-OE faae5a4bcb1476321887dc8832cd2b5e X-Terabit: YES Cc: Gary Jennejohn , 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:36:06 -0000 --Y8IEA2AKDLXNckrV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 09, 2009 at 07:59:54PM +0200, Lothar Scholz wrote: > Hello Gary, >=20 >=20 > GJ> According to the man page name MUST start with '/'. >=20 > Thanks, but this is not the problem. Do "kldload sem". --Y8IEA2AKDLXNckrV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkoFxtkACgkQC3+MBN1Mb4jhuwCfbqhcXsNYmNroJ96A07kY+3PE A+0Anj/GTaIBuKWA53hjapeySEk6O085 =7IwT -----END PGP SIGNATURE----- --Y8IEA2AKDLXNckrV-- From owner-freebsd-arch@FreeBSD.ORG Sat May 9 18:38:16 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 86EF41065670 for ; Sat, 9 May 2009 18:38:16 +0000 (UTC) (envelope-from scholz@scriptolutions.com) Received: from dd17920.kasserver.com (dd17920.kasserver.com [85.13.138.236]) by mx1.freebsd.org (Postfix) with ESMTP id 473B68FC0A for ; Sat, 9 May 2009 18:38:16 +0000 (UTC) (envelope-from scholz@scriptolutions.com) Received: from X64SSD (unknown [222.123.80.238]) by dd17920.kasserver.com (Postfix) with ESMTP id 434BD181B39B7; Sat, 9 May 2009 20:38:13 +0200 (CEST) Date: Sat, 9 May 2009 20:36:10 +0200 From: Lothar Scholz X-Mailer: The Bat! (v3.62.08) Professional Organization: Scriptolutions X-Priority: 3 (Normal) Message-ID: <123863765.20090509203610@scriptolutions.com> To: pluknet In-Reply-To: References: <976698487.20090509182307@scriptolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-arch@freebsd.org Subject: Re[2]: Are named posix semaphores not implemented? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Lothar Scholz 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:38:16 -0000 Hello pluknet, p> First, you should have sem(4) capacity enabled in kernel p> (via kldload or statically built). It seems you haven't. Yes - but it was a total fresh PC-BSD build. I must say that i really don't like this start off with anything disabled. They will never get a good desktop os if the user can't run simple programs without the need to learn about kernel modules. Well this is the wrong list to discuss this anyway. -- Best regards, Lothar Scholz mailto:scholz@scriptolutions.com From owner-freebsd-arch@FreeBSD.ORG Sat May 9 20:07:27 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 B3CD9106566B for ; Sat, 9 May 2009 20:07:27 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 7402F8FC2A for ; Sat, 9 May 2009 20:07:27 +0000 (UTC) (envelope-from jilles@stack.nl) Received: by mx1.stack.nl (Postfix, from userid 65534) id D67D3359950; Sat, 9 May 2009 22:07:26 +0200 (CEST) X-Spam-DCC: CTc-dcc2: scanner01.stack.nl 1031; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on scanner01.stack.nl X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Relay-Country: _RELAYCOUNTRY_ Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id B8586359947; Sat, 9 May 2009 22:07:24 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id A6C49228B7; Sat, 9 May 2009 22:07:24 +0200 (CEST) Date: Sat, 9 May 2009 22:07:24 +0200 From: Jilles Tjoelker To: Lothar Scholz Message-ID: <20090509200724.GA25714@stack.nl> References: <588815840.20090509203115@scriptolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <588815840.20090509203115@scriptolutions.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-arch@freebsd.org Subject: Re: Posix shared memory problem 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 20:07:27 -0000 On Sat, May 09, 2009 at 08:31:15PM +0200, Lothar Scholz wrote: > Thanks for solving the posix semaphore problem. But with shared memory > there comes the next issue: > int main() { > int m; > shm_unlink("/barfoo"); > m = shm_open("/barfoo", O_RDWR|O_CREAT|O_EXCL, S_IRWXU); > if (m == 1) perror("shm_open error"); > } > i always get permission denied error, and i tried many values > for flags and mode? I can only get this working as root but not > as a normal user. shm_open/shm_unlink refer to the filesystem; they are fairly direct wrappers around open and unlink. POSIX suggests making the pathname a configuration option; alternatively, using a directory for temporary files such as /tmp could work. -- Jilles Tjoelker From owner-freebsd-arch@FreeBSD.ORG Sat May 9 20:29:51 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 1438F1065672 for ; Sat, 9 May 2009 20:29:51 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id A58EC8FC0A for ; Sat, 9 May 2009 20:29:50 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id E4A341CDE9; Sat, 9 May 2009 22:29:49 +0200 (CEST) Date: Sat, 9 May 2009 22:29:49 +0200 From: Ed Schouten To: Jilles Tjoelker Message-ID: <20090509202949.GD58540@hoeg.nl> References: <588815840.20090509203115@scriptolutions.com> <20090509200724.GA25714@stack.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fTMItigZdw4hn5Z7" Content-Disposition: inline In-Reply-To: <20090509200724.GA25714@stack.nl> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: Lothar Scholz , FreeBSD Arch Subject: Re: Posix shared memory problem 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 20:29:51 -0000 --fTMItigZdw4hn5Z7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Jilles, * Jilles Tjoelker wrote: > shm_open/shm_unlink refer to the filesystem; they are fairly direct > wrappers around open and unlink. Achtung: this is no longer the case in CURRENT if I remember correctly. --=20 Ed Schouten WWW: http://80386.nl/ --fTMItigZdw4hn5Z7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkoF570ACgkQ52SDGA2eCwXvigCeJOmdGtpgfcfWmj+zHpp/f+Kr tEYAn2fMemkD/zxUgHSH9SJ+5VszZzbw =fXG8 -----END PGP SIGNATURE----- --fTMItigZdw4hn5Z7--