Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: List service ACLs on Mac OS X 10.5 Server' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: List service ACLs on Mac OS X 10.5 Server
Authored by: wallybear on Jul 21, '09 11:10:00AM

mmmhmm... It seems I found the answer.

The sleep command follows the locale settings. If I type:

$ time sleep 0,5
real 0m0.503s
user 0m0.001s
sys 0m0.002s

$ time sleep 0,2
real 0m0.203s
user 0m0.001s
sys 0m0.002s

and so on (note the "," instead of "."), I get correct timings (my locale uses "," as decimal point).
But this makes scripts using sleep with fractional timings unreliable: they work correctly only with certain locales.

So I think it's still better to use the other solutions I pointed above, that do not depend from locales.



[ Reply to This | # ]
10.5: List service ACLs on Mac OS X 10.5 Server
Authored by: patpro on Jul 23, '09 01:35:02PM

Hi,

You might want to test the latest update of the script. I've added a LC_NUMERIC=en_US on the sleep 0.05 line, so that the beachball cursor should run nicely on your system.

---
http://www.patpro.net/



[ Reply to This | # ]
10.5: List service ACLs on Mac OS X 10.5 Server
Authored by: wallybear on Jul 23, '09 04:06:27PM

Yes, it works. That's a workaround, but fixes the problem and makes the script more "international".

BTW, I think that a 0.05 delay it's a little too small, the "infamous beachball" spins too fast (its almost difficult to realize it's spinning); a 0.1 delay (or, better, 0.2) is more visually appealing. Just my opinion.



[ Reply to This | # ]
10.5: List service ACLs on Mac OS X 10.5 Server
Authored by: patpro on Jul 27, '09 08:14:39AM

well, the 0.05 delay might be too small, you are right. I've made 99% of my tests over an ssh connection, so may be the latency slowed my beachball :)
I'll change that in the next release (along with a bunch of other details, hopefully).

---
http://www.patpro.net/



[ Reply to This | # ]
10.5: List service ACLs on Mac OS X 10.5 Server
Authored by: wallybear on Jul 23, '09 04:16:05PM

It's fun noting that the python script I wrote above ignores locales (wants "." as decimal point or it will give an error) while sleep doesnt... no consistent locale behaviour in CLI.



[ Reply to This | # ]