From owner-freebsd-hackers Wed Dec 6 02:04:01 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id CAA27381 for hackers-outgoing; Wed, 6 Dec 1995 02:04:01 -0800 (PST) Received: from yokogawa.co.jp (yhqfm.yokogawa.co.jp [202.33.29.34]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id CAA27372 for ; Wed, 6 Dec 1995 02:03:51 -0800 (PST) Received: from sjc.yokogawa.co.jp ([133.140.4.100]) by yokogawa.co.jp (8.6.9+2.4Wb3/3.3Wb4-firewall:08/09/94) with SMTP id TAA09178 for ; Wed, 6 Dec 1995 19:02:27 +0900 Received: from leia.pa.yokogawa.co.jp by sjc.yokogawa.co.jp (4.1/6.4J.6-YOKOGAWA-R/GW) id AA21922; Wed, 6 Dec 95 19:02:26 JST Received: from cabbage by leia.pa.yokogawa.co.jp (16.8/6.4J.6-YOKOGAWA/pa) id AA24490; Wed, 6 Dec 95 19:02:25 +0900 Received: by cabbage.pa.yokogawa.co.jp (16.6/3.3Wb) id AA16768; Wed, 6 Dec 95 19:02:51 +0900 Date: Wed, 6 Dec 95 19:02:51 +0900 From: Mihoko Tanaka Message-Id: <9512061002.AA16768@cabbage.pa.yokogawa.co.jp> To: freebsd-hackers@freebsd.org Subject: samaphore remains Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-hackers@freebsd.org Precedence: bulk Hi All, Currently I'm using FreeBSD-R2.1.0-RELEASE on GATEWAY 2000 P5-90. 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. Although one of the UNIX implementation calls semexit() routine from exit(), FreeBSD doesn't call semexit() from anywhere. Is there any reason for this? I tried to fix the exit() as follows and it seems working well. ------------- cut here --------------- *** kern_exit.c Tue May 30 17:05:25 1995 --- kern_exit.c.new Wed Dec 6 15:12:28 1995 *************** *** 130,135 **** --- 130,139 ---- */ fdfree(p); + #ifdef SYSVSEM + semexit(p); + #endif + /* The next two chunks should probably be moved to vmspace_exit. */ vm = p->p_vmspace; #ifdef SYSVSHM ------------- cut here --------------- -- Mihoko Tanaka