On Wed, 25.06.08 20:00, William Jon McCann ([EMAIL PROTECTED]) wrote:

Hey!

> >> We can still support applications that only know if they should
> >> inhibit "just in time" by emitting a signal when a logout is
> >> requested.  The applications can then take an inhibit in response to
> >> that signal.
> >
> > This part sounds racy. Is it?
> 
> It is.  Logout is a racy proposition.  We should strongly recommend
> that people use the Inhibit API.

Nah, it doesn't have to be racy. Since you know all your clients, you
can make sure everyone received your "i am about to shut down", by
requiring them to respond with an ack. If they all responded you go
on. If some process didn't respond in 2s or so, you assume it is bad
behaving, and ignore it. Between the time the clients received the
broadcast until they send you the ack back they have time to call the
Inhibit() function if they want to. Race is gone, and the protocol is
only a tiny bit more complex: you need to wait until all clients
respond back to you, 2s at max. 

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4
_______________________________________________
desktop-devel-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Reply via email to