Version: (using KDE Devel) Installed from: Compiled sources kdepasswd always exits with an exit code of 0 so you can't use it in shell scripts. The attached (attempt at a) patch lets kdepasswd return 1 if one of the dialogs were cancelled and 2 if a kdepasswd instance is already running. I don't know if returning a non-zero exitcode for when an instance of the application is already running is consistent with what the rest of KDE does.
Created attachment 6364 [details] let exitcode make a bit more sense Don't take this literally as I have only little experience in KDE programming.
what about this patch ? is it good ? if yes can it be apply ?
kdepasswd on KDE4 should be checked: is it right?
I've just had a look: kdepasswd in KDE 4 still only returns 0, no matter whether the password was changed successfully or not. With tiny changes, the patch can still be applied.
You're right. Thank Marcel, I'll commit it. It seems right.
SVN commit 901895 by finex: More useful return codes. BUG: 83387 M +5 -3 kdepasswd.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=901895