Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Dec 95 19:02:51 +0900
From:      Mihoko Tanaka <m_tanaka@pa.yokogawa.co.jp>
To:        freebsd-hackers@freebsd.org
Subject:   samaphore remains
Message-ID:  <9512061002.AA16768@cabbage.pa.yokogawa.co.jp>

next in thread | raw e-mail | index | archive | help

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 
<m_tanaka@pa.yokogawa.co.jp>     
	



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9512061002.AA16768>