From owner-freebsd-gnome@FreeBSD.ORG Thu Jan 20 10:53:13 2011 Return-Path: Delivered-To: freebsd-gnome@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E56C21065673; Thu, 20 Jan 2011 10:53:13 +0000 (UTC) (envelope-from knowtree@aloha.com) Received: from mail003.14.12.a.static.mtka.securence.com (mail003.14.12.A.static.MTKA.securence.com [216.17.12.14]) by mx1.freebsd.org (Postfix) with ESMTP id 9421D8FC14; Thu, 20 Jan 2011 10:53:13 +0000 (UTC) received: from usi-mail08-mtka.usinternet.com. (216.17.3.12) by mta13.mtka.securence.com (securence); thu, 20 jan 2011 04:38:54 -0600 (cst) Received: from [10.0.1.10] (atm-251-63.pixi.com [206.127.251.63]) by usi-mail08-mtka.usinternet.com (Postfix) with ESMTP id E11C92204AA; Thu, 20 Jan 2011 04:38:24 -0600 (CST) From: Gary Dunn To: Joe Marcus Clarke In-Reply-To: <4D30F543.5030607@freebsd.org> References: <201101142247.p0EMlseq007084@smtpauth.pixi.com> <4D30F543.5030607@freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Thu, 20 Jan 2011 00:38:47 -0800 Message-ID: <1295512727.1913.13.camel@slate01> Mime-Version: 1.0 X-Mailer: Evolution 2.28.2 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit x-securence-id: 1295519934044-013-00776943 x-securence-country-code: us - united states x-securence-odset: main.outbound.usinternet.com x-securence-remote-host: usi-mail08-mtka.usinternet.com. x-securence-remote-addr: 216.17.3.12 x-securence-rfc2821-mail-from: knowtree@aloha.com x-securence-pp1t: 1 x-securence-trat: 3 x-securence-omc: 0 x-securence-tsist: 5 x-securence-urt: 2 x-securence-art: 0 x-securence-drt: 7 x-securence-info: d5; 0orl0; 1otrp1; 79opp10; 0osrb9; 15ous183; 10oavs0; 82ovxr0; 1oclm100; 19ocom0; 0obsp0; 81ovrc0; 19ophc0; 98isd0; 96dds0; 88domsplt0; 99vac0; 23dogp0; 80med0; 21fsqd0; 17fsdd3; 58dod0; 0dds0; 92domsplt0; 31vac0; 63dogp0; 99med0; 95fsqd0; 27fsdd2; 83dod0; 10cld0; 21lrd0; 45dlv0; dmqq128; s491; t492 x-securence-defer-note-1: attempted to deliver at 2011-01-20 04:38:57 (cst) x-securence-defer-note-2: attempted to deliver at 2011-01-20 04:40:14 (cst) x-securence-defer-note-3: attempted to deliver at 2011-01-20 04:42:13 (cst) x-securence-defer-note-4: attempted to deliver at 2011-01-20 04:46:13 (cst) X-Securence-Latseq: <13-1295519935628> Cc: freebsd-gnome@freebsd.org Subject: Re: Shutdown signal protocol X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jan 2011 10:53:14 -0000 On Fri, 2011-01-14 at 20:15 -0500, Joe Marcus Clarke wrote: > On 1/14/11 5:47 PM, knowtree@aloha.com wrote: > > Can someone point me to info on the signals and protocol used by gnome > at liftoff [logoff] > and shut down. I want a non-gnome app to respond gracefully to shut down. > > Apps that obey XSMP should do the right thing. gnome-session will also > send a SIGTERM to all auto-spawned apps. > > Joe > The app in question is Squeak, specifically the Squeak VM. I guess I don't understand "auto-spawned apps." To get started I wrote a little shell script that traps SIGTERM, then waits for input. The trap calls a second script that also reads input. When I run the first and kill -SIGTERM the trap works fine. When I run the first and logoff or shutdown, there is no sign of the trap -- my session just closes down as usual. I expected the logoff process to wait until I satisfied the READ statement. I even expanded the trap list to trap 'sqvmtrap2.sh;' 1 2 3 15 As for XSMP, the Squeak VM does not implement that. Someone has suggested using D-BUS instead. I was trying to start simple, with a SIGTERM trap, but I guess that is not an option. To me, D-BUS seems like overkill when all I want is to save the current image in the event of a logoff or shutdown. The way it is now, logging off without exiting Squeak causes file system corruption. -- Gary Dunn, Honolulu Open Slate Project http://openslate.org http://www.facebook.com/garydunn808 http://e9erust.blogspot.com Twitter @garydunn808 Sent from Slate001