Bug 83387 - make kdepasswd's exitcode useful [PATCH]
Summary: make kdepasswd's exitcode useful [PATCH]
Status: RESOLVED FIXED
Alias: None
Product: kdepasswd
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Geert Jansen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-14 22:07 UTC by Marcel Martin
Modified: 2008-12-26 22:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
let exitcode make a bit more sense (995 bytes, patch)
2004-06-14 22:10 UTC, Marcel Martin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Martin 2004-06-14 22:07:20 UTC
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.
Comment 1 Marcel Martin 2004-06-14 22:10:49 UTC
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.
Comment 2 Nicolas L. 2006-04-11 16:10:24 UTC
what about this patch ? is it good ? 
if yes can it be apply ?
Comment 3 FiNeX 2008-12-26 15:41:56 UTC
kdepasswd on KDE4 should be checked: is it right?
Comment 4 Marcel Martin 2008-12-26 21:40:56 UTC
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.
Comment 5 FiNeX 2008-12-26 22:25:10 UTC
You're right. Thank Marcel, I'll commit it. It seems right.
Comment 6 FiNeX 2008-12-26 22:25:35 UTC
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