Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 137981

Summary: keychain --lockwait 0 does not have expected behaviour
Product: Gentoo Linux Reporter: Marcus Furlong <furlongm>
Component: Current packagesAssignee: Aron Griffis (RETIRED) <agriffis>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Marcus Furlong 2006-06-25 15:42:08 UTC
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 Aron Griffis (RETIRED) gentoo-dev 2006-09-08 14:39:33 UTC
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