[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pan-users] Re: Server list getting lost. Possible cause discovered.
From: |
Duncan |
Subject: |
[Pan-users] Re: Server list getting lost. Possible cause discovered. |
Date: |
Mon, 4 Aug 2008 06:58:06 +0000 (UTC) |
User-agent: |
Pan/0.133 (House of Butterflies) |
walt <address@hidden> posted
address@hidden, excerpted below, on Mon, 04 Aug 2008 03:36:05
+0000:
> On Sun, 03 Aug 2008 08:27:55 +0000, Duncan wrote:
>
>> ...
>> Yes, a second running instance can screw pan up. AFAIK what it does is
>> keep the settings from the last closed version, thus losing any changes
>> you made to the first-closed version...
>
> A simple lockfile written to ~/.pan2 should prevent this kind of thing.
> It should be simple enough that even we could do it :o)
You're right. I should add that to my pan starter scripts. I knew there
was a way but just hadn't thought it out.
The good thing about it is that a lock-file based solution such at that
won't interfere with deliberate (separate settings) multi-sessions,
either.
The bad thing... if pan crashes, the lockfile will keep it from starting
again, as it'll think it's already going.
The fix for that... the old PID in the lockfile trick, check for the PID
and if it's indeed a pan process, abort (and preferably bring the
existing process forward and into focus) if so, cleanup if not.
Or alternatively (and perhaps simpler to implement from a starter script,
using kdialog or the like), simply popup a prompt, saying a previous
run's lockfile was detected, and asking whether the user wants to cleanup
the old lock and start anyway, or abort.
Thanks for the idea! =8^)
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman