Bug 109637

Summary: Erase lockfile when SIGINT/SIGTERM/etc received
Product: [Applications] kmail Reporter: Juergen Sauer <juergen.sauer>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: bjoern
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch for kmstartup.cpp.

Description Juergen Sauer 2005-07-26 11:21:59 UTC
Version:           1.8.1 (using KDE 3.4.1, Kubuntu Package 4:3.4.1-0ubuntu0hoary1 ())
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-8ubuntu2)
OS:                Linux (i686) release 2.6.11.7

If kmail is used on a LAN using NFS mounted $HOME, it's possible that kmail left open and the user changed the workstation to another.
kmail reports correctliy that -if started again from other workstation- that it is running on the old workstation.
If kmail is killed by SIGINT (killall kmail i.e.) to close kmail on the old workstation where it was left behind and forgotten, it does not remove the lock/hint/pid file.

If kmail is now started on the other workstation again, it shows up a now wrong hint dialog, that it is still running on the old station. Clicking the dialog away solves all, but it is anoying to rookie users.

Simply removing the lock file in the sigint kill handling routine would solve it.
Comment 1 Juergen Sauer 2005-07-30 12:24:11 UTC
Am Samstag, 30. Juli 2005 02:59 schrieb Thiago Macieira:
[bugs.kde.org quoted mail]

Why do you reassign a Bug as Wish ?
That's an _very_ anoying Bug in the practical use and insures unexpierienced 
users quite a lot.

Our support has many requests due this Bug.

jojo
Comment 2 Thiago Macieira 2005-07-30 19:53:42 UTC
unimplemented feature -> wish
Comment 3 Bernhard E. Reiter 2005-08-26 15:31:02 UTC
I can confirm the bug with Kmail 1.7 proko2 branch after 2.0.1.
It is a real bug for coporate users.
Comment 4 Janis M. 2005-08-29 11:35:51 UTC
Created attachment 12414 [details]
Patch for kmstartup.cpp.

I have the same kind of problem within KDE 3.4.0 (Kontact 1.1).
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.)
Comment 5 spirit 2005-09-07 19:36:20 UTC
Same problem for me for my company (/home on nfs)

could you post your patch ?

thanks

SPiRiT

Comment 6 Juha Tuomala 2006-02-05 10:18:22 UTC
Lockfile related bug 86516.
Comment 7 Björn Ruberg 2009-12-21 20:19:35 UTC
Haven't seen this problem for some time either. Considering fixed as long no one states the opposite.