Tracking whether a connection is alive

David Zeuthen david at fubar.dk
Mon Jul 12 06:40:10 PDT 2004


On Mon, Jul 12, 2004 at 03:06:27PM +0200, Maciej Katafiasz wrote:
> W li?cie z pon, 12-07-2004, godz. 12:29, Owen Fraser-Green pisze: 
> > Hi,
> > 
> > > W li¶cie z pon, 12-07-2004, godz. 10:44, David Zeuthen pisze:
> > > One solution slightly more elegant than pinging periodically is to ping
> > > only on attempt to lock acquisition, this however introduces up to
> > > $TIMEOUT latency without removing fundamental issues, so maybe it isn't
> > > all that great optimization.
> > 
> > Another alternative is leasing the lock so the acquirer has to be alive in
> > order to keep renewing the lease to keep the lock.
> 
> Yeah, renewable lease seems to be best solution, with it code dealing
> with stalled locks in HAL in smallest version can be trivially reduced
> to:
> 

[snip insightful text about locking and renewing leases]

This seems generic enough to implement in D-BUS proper since D-BUS
already has the concept of objects; the system message bus could
keep track of who has the lcok and handle the renewal of the leases.

But for HAL I think I'll start out by just assuming that the desktop
session (e.g. the WM) helps with killing badly behaved applications.

Cheers,
David



More information about the dbus mailing list