Safe shut down

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Safe shut down

Gary Dunn-2

Is there a way to intercept a shut down signal from Gnome on Freebsd to allow the user to perform an orderly exit from Squeak?


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Safe shut down

Bert Freudenberg
On 14.01.2011, at 20:48, Gary Dunn wrote:

Is there a way to intercept a shut down signal from Gnome on Freebsd to allow the user to perform an orderly exit from Squeak?


You would have to modify the VM. If you do, great, we need that for OLPC too:


- Bert -



_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Safe shut down

David T. Lewis
On Fri, Jan 14, 2011 at 09:54:09PM +0100, Bert Freudenberg wrote:

> On 14.01.2011, at 20:48, Gary Dunn wrote:
> > Is there a way to intercept a shut down signal from Gnome on Freebsd to allow the user to perform an orderly exit from Squeak?
>
>
> You would have to modify the VM. If you do, great, we need that for OLPC too:
>
> http://tracker.squeakland.org/browse/SQ-192
>
> - Bert -
>
>

If you mean "shut down signal" in the sense of responding to a SIGHUP
signal, then you can do this using OSProcess. I am away and cannot
check the specific reference but look for a selector containing
'forwardSignal'. This allows you to arrange for the SIGHUP to signal
a Smalltalk semaphore, so if you have a process waiting on that semaphore,
it can do whatever cleanup procedures you have in mind.

If this refers to an X11 event (as opposed to an OS signal), then I
don't know how to do it.

Dave

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Safe shut down

Gary Dunn-2
In reply to this post by Bert Freudenberg

Interesting, I found this in a discussion on XSMP:

Newer alternative sessions (GDM Greeter, OLPC Sugar) don't want to support XSMP

http://live.gnome.org/SessionManagement/GnomeSession

In any case I am looking into it.

On Jan 14, 2011 10:54 AM, "Bert Freudenberg" <[hidden email]> wrote:

On 14.01.2011, at 20:48, Gary Dunn wrote:
>
> Is there a way to intercept a shut down signal from Gn...

You would have to modify the VM. If you do, great, we need that for OLPC too:


- Bert -



_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Safe shut down

dcorking
On Sat, Jan 15, 2011 at 5:05 AM, Gary Dunn wrote[1] :

> Interesting, I found this in a discussion on XSMP:
>
> Newer alternative sessions (GDM Greeter, OLPC Sugar) don't want to support
> XSMP
>
> http://live.gnome.org/SessionManagement/GnomeSession
>
> In any case I am looking into it.

Sounds great.  This bug (linked from the above GNOME wiki page) looks
particularly relevant:

https://bugzilla.gnome.org/show_bug.cgi?id=535829

Hope that helps, David

[1] http://lists.squeakfoundation.org/pipermail/beginners/2011-January/007497.html
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Safe shut down

Gary Dunn-2

All we really need is to clean up a session during shutdown. The simple way is to trap SIGTERM and do the right thing: at the minimum do a save. If possible, prompt user to save yes/no. XSMP and D-BUS do more than Unix signals, such as the option to restart automatically. That sort of thing might be useful, but let's learn to walk first.

Comments welcome.

On Jan 19, 2011 9:24 PM, "David Corking" <[hidden email]> wrote:

On Sat, Jan 15, 2011 at 5:05 AM, Gary Dunn wrote[1] :


> Interesting, I found this in a discussion on XSMP:
>
> Newer alternative sessions (GDM Greeter, O...

Sounds great.  This bug (linked from the above GNOME wiki page) looks
particularly relevant:

https://bugzilla.gnome.org/show_bug.cgi?id=535829

Hope that helps, David

[1] http://lists.squeakfoundation.org/pipermail/beginners/2011-January/007497.html

_______________________________________________
Beginners mailing list
[hidden email]...


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Safe shut down

Bert Freudenberg
On 20.01.2011, at 09:41, Gary Dunn wrote:

> All we really need is to clean up a session during shutdown. The simple way is to trap SIGTERM and do the right thing: at the minimum do a save. If possible, prompt user to save yes/no. XSMP and D-BUS do more than Unix signals, such as the option to restart automatically. That sort of thing might be useful, but let's learn to walk first.
>
> Comments welcome.

Since implementing this is hardly a beginner's topic, let's move the discussion to squeak-dev. Reply-To set.

Catching SIGTERM should be reasonably simple using OSProcess.

There also are D-Bus bindings for Squeak that could be used.

Both options are IMHO inferior to having XSMP support in the VM, which should work across pretty much all X11 desktops. But they appear to be easier to implement.

- Bert -

>
>> On Jan 19, 2011 9:24 PM, "David Corking" <[hidden email]> wrote:
>>
>> On Sat, Jan 15, 2011 at 5:05 AM, Gary Dunn wrote[1] :
>>
>> > Interesting, I found this in a discussion on XSMP:
>> >
>> > Newer alternative sessions (GDM Greeter, O...
>>
>> Sounds great.  This bug (linked from the above GNOME wiki page) looks
>> particularly relevant:
>>
>> https://bugzilla.gnome.org/show_bug.cgi?id=535829
>>
>> Hope that helps, David
>>
>> [1] http://lists.squeakfoundation.org/pipermail/beginners/2011-January/007497.html
>> _______________________________________________
>> Beginners mailing list
>> [hidden email]...
>>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Safe shut down

Bert Freudenberg

On 20.01.2011, at 13:03, Bert Freudenberg wrote:

> Since implementing this is hardly a beginner's topic, let's move the discussion to squeak-dev. Reply-To set.

Meh. Reply-to is getting munged on newbies list. Please adjust headers manually.

- Bert -

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners