Version: (using KDE KDE 3.2.1) Installed from: RedHat RPMs OS: Linux The "lock" file in '~/.kde/share/apps/kmail' folder does not get deleted when the user ends session/logs out while running 'kontact'. Because of this reason when the user log's in, an attempt is made to restore the kontact session and while this happens a message stating that there is already one instance of kmail running as indicated by the "lock" file. The only way to get contact running after this is manually deleting the "lock" file in the '~/.kde/share/apps/kmail' folder.
I have a similar problem, though it doens not happen every time. It happens frequently enough to be annoying. I believe it is related to Kontact or KMail not shutting down correctly when I shut my notebook down without closing KMail first. I'm not sure, but I don't believe I've ever had the problem if I've closed Kontact before shutting my system down.
I had this problem in previous versions but never in 3.3. or 3.3.1.
I can confirm #1, and this is very annoying. BTW: Is the session saved when calling "halt"?
I have a related bug in 3.3. When I login kontact is always restored correctly. But when I try to start kontact (again), to bring it to front I get this error message that kontact is already running and I have the option to kill kontact or to go on. This only habbens when the first instance of kontact is started by restoring the previous session. It does not appear when I start kontact manually and then try to start kontact again. Very annoying since I use my multi-media-keys to bring kontact to front...
Can someone from the kmail hackers please have a look at the session management when running in kontact?
I got a similar prblem in KDE3.4.0 (Kontact 1.1). If Kontakt is killed with kill oder killall the pid value in the lock file will not be set to -1. If I log out from KDE (Kontact still running) the pid value is set to -1 (sometimes, not every time.).
Created attachment 12415 [details] Patch for kmstartup.cpp. We have created a Patch for KMails kmstartup.cpp. It fixes the problem for us. (Sets -1 as Pid value in the lock-file. Even if Kontact gets SIGTERM or SIGHUP etc.)
I still run into this bug with Kontact 1.2/KDE 3.5. Why wasn't the attached patch checked in? Maybe it could be refactored to avoid the code duplication, but isn't it the right approach?
Kontact on KDE 3.5.8 and KDE 4 is working fine. After killing process there is no more file locking problems.