From owner-freebsd-ports Sat Sep 21 12: 2:55 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 7FB5837B401; Sat, 21 Sep 2002 12:02:53 -0700 (PDT) Received: from mail.imp.ch (mail.imp.ch [157.161.1.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6435843E3B; Sat, 21 Sep 2002 12:02:52 -0700 (PDT) (envelope-from mb@imp.ch) Received: from nbs.imp.ch (nbs.imp.ch [157.161.4.7]) by mail.imp.ch (8.12.3/8.12.3) with ESMTP id g8LJ2pHb051869; Sat, 21 Sep 2002 21:02:51 +0200 (CEST) (envelope-from Martin.Blapp@imp.ch) Received: from nbs.imp.ch (nbs.imp.ch [157.161.4.7]) by nbs.imp.ch (8.12.3/8.12.3) with ESMTP id g8LJ2p75892386; Sat, 21 Sep 2002 21:02:51 +0200 (MES) Date: Sat, 21 Sep 2002 21:02:51 +0200 From: Martin Blapp To: lioux@freebsd.org Cc: ports@freebsd.org Subject: Patch for ogle to really exit if okle or ogle-gui is closed. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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, 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 ------------------------------------------------------------------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message