Bug 137981 - keychain --lockwait 0 does not have expected behaviour
Bug#: 137981 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: agriffis@gentoo.org Reported By: furlongm@gmail.com
Component: Applications
URL: 
Summary: keychain --lockwait 0 does not have expected behaviour
Keywords:  
Status Whiteboard: 
Opened: 2006-06-25 15:42 0000
Description:   Opened: 2006-06-25 15:42 0000
I usually start my KDE session with one konsole but with around ten tabs open
on it. I only want keychain output to come up on one so looking at the options,
I saw the --lockwait option.

   --lockwait seconds
       How long to wait for the lock to become available. Defaults to 30
seconds.

If it is locked I don't want to bother waiting at all, so I set lockwait to 0,
meaning wait zero seconds, don't wait at all. 

After a few unsucessful attempts (an infinite loop waiting for the lock), a
quick look at the script shows that using a value of zero for the seconds seems
to mean wait indefinitely for the lock, rather than waiting zero seconds. Is
this the correct behaviour (as in expected). If so, maybe a comment to this
effect in the man page or help output would be appropriate.

------- Comment #1 From Aron Griffis (RETIRED) 2006-09-08 14:39:33 0000 -------
Good point.  0 was supposed to mean forever, but it makes more sense to use -1
for that and let 0 return immediately.

Fixed in 2.6.6