Date: Wed, 6 Dec 1995 12:15:29 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: m_tanaka@pa.yokogawa.co.jp (Mihoko Tanaka) Cc: freebsd-hackers@FreeBSD.org Subject: Re: samaphore remains Message-ID: <199512061915.MAA01689@phaeton.artisoft.com> In-Reply-To: <9512061002.AA16768@cabbage.pa.yokogawa.co.jp> from "Mihoko Tanaka" at Dec 6, 95 07:02:51 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> 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> This looks exactly right. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512061915.MAA01689>