From owner-freebsd-hackers Wed Dec 27 07:23:52 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA27532 for hackers-outgoing; Wed, 27 Dec 1995 07:23:52 -0800 (PST) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id HAA27510 for ; Wed, 27 Dec 1995 07:23:34 -0800 (PST) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id QAA13140; Wed, 27 Dec 1995 16:23:25 +0100 Received: by sax.sax.de (8.6.11/8.6.12-s1) with UUCP id QAA05469; Wed, 27 Dec 1995 16:23:12 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.7.3/8.6.9) id QAA03532; Wed, 27 Dec 1995 16:08:05 +0100 (MET) From: J Wunsch Message-Id: <199512271508.QAA03532@uriah.heep.sax.de> Subject: Re: samaphore remains To: m_tanaka@pa.yokogawa.co.jp (Mihoko Tanaka) Date: Wed, 27 Dec 1995 16:08:04 +0100 (MET) Cc: freebsd-hackers@freebsd.org Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <9512061002.AA16768@cabbage.pa.yokogawa.co.jp> from "Mihoko Tanaka" at Dec 6, 95 07:02:51 pm X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-hackers@freebsd.org Precedence: bulk As Mihoko Tanaka wrote: > > I found the trouble that if a program using semaphore died > anbormally, the semaphore which was created remains on kernel. > I think it should be released by kernel's exit() function. Nope, it's an IPC facility, hence it should persist across the death of a process. > Although one of the UNIX implementation calls semexit() routine from > exit(), FreeBSD doesn't call semexit() from anywhere. > Is there any reason for this? You are right however, semexit() should be called from exit(), in order to have ``undo vectors'' processed. Thanks! -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)