From owner-freebsd-ports Sat Sep 21 12:37:16 2002 Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AAFE37B401 for ; Sat, 21 Sep 2002 12:37:14 -0700 (PDT) Received: from heaven.gigo.com (heaven.gigo.com [64.57.102.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6A2B43E7B for ; Sat, 21 Sep 2002 12:37:13 -0700 (PDT) (envelope-from lioux@brturbo.com) Received: from 200-163-6-086-bsace7003.dsl.telebrasilia.net.br (200-163-6-086-bsace7003.dsl.telebrasilia.net.br [200.163.6.86]) by heaven.gigo.com (Postfix) with ESMTP id 83F2FB8A9 for ; Sat, 21 Sep 2002 12:37:02 -0700 (PDT) Received: (qmail 57793 invoked by uid 1001); 21 Sep 2002 19:34:26 -0000 Message-ID: <20020921193426.57792.qmail@exxodus.fedaykin.here> Date: Sat, 21 Sep 2002 16:34:04 -0300 From: Mario Sergio Fujikawa Ferreira To: Martin Blapp Cc: ports@freebsd.org Subject: Re: Patch for ogle to really exit if okle or ogle-gui is closed. References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-Operating-System: FreeBSD 4.7-PRERELEASE X-Disclaimer: I hope you find what you are looking for... in life :) Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, I received your report regarding ogle and message queue pieces being left after closing it IF there is no controlling terminal. However, I can't reproduce it. I did exactly what you said using a -STABLE box. 1) control-f2 -> okle 2) close (no left msqid) 1) start application menu -> multimedia -> okle 2) close (no left msqid) Are you using -CURRENT? I bet it's a problem in current and threads since the exit clean up is done within a separate thread. Can anyone reproduce this in a -STABLE box? If we find out that this is specific to -CURRENT, I will add this patch as an optional one. On Sat, Sep 21, 2002 at 09:02:29PM +0200, Martin Blapp wrote: > > Hi, > > This patch does kill that parent process (ogle), so the shared memory > segments get released as they should. > > I used to start okle (the KDE ogle gui works *a lot* better that the > half broken gnome stuff) from a icon, without a opened terminal. After > closing the gui wrapper, ogle just hanged there and I had to manually > remove the shm with "pcrm -q msqid", ann kill all ogle prozesses. > Without that, a second call to ogle just hanged. > > This may be a easy hack, but it works like a charm. Maybe you should even > ask portmgr@ to committ this to the ogle port, since it's a big > benefit for users. > > Note that SIGKILL doesn't work. I had to use SIGINT, as one does > in the shell with CTRL-C. > > Martin > > --- ogle/dvdcontrol.c.orig Sat Aug 3 19:34:50 2002 > +++ ogle/dvdcontrol.c Sat Sep 21 20:46:33 2002 > @@ -171,13 +171,17 @@ > * @todo something > */ > DVDResult_t DVDCloseNav(DVDNav_t *nav) { > - > + > + pid_t pid; > if(nav->msgq == NULL) { > fprintf(stderr, "dvdcontrol: already closed\n"); > return DVD_E_Unspecified; > } > > MsgClose(nav->msgq); > + > + pid = getppid(); > + kill(pid, SIGINT); > > nav = NULL; > > Martin > > Martin Blapp, > ------------------------------------------------------------------ > ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH > Phone: +41 061 826 93 00: +41 61 826 93 01 > PGP: > PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E > ------------------------------------------------------------------ > -- Mario S F Ferreira - DF - Brazil - "I guess this is a signature." Computer Science Undergraduate | FreeBSD Committer | CS Developer flames to beloved devnull@someotherworldbeloworabove.org feature, n: a documented bug | bug, n: an undocumented feature To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message