Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: clockctl(4) vs settimeofday(2)



On Dec 8,  6:42am, paul%vps1.whooppee.com@localhost (Paul Goyette) wrote:
-- Subject: Re: clockctl(4) vs settimeofday(2)

| > If you know that you are not going to succeed (because you are not
| > root), you should cache the fd, and just do the ioctl each time
| > you want to sync to reduce latency.  The dumb caller is probably
| > an old program that probably is used to be running as root, so
| > reducing the delay/overhead for it by trying syscall first is better.
| 
| Yes, the current syscall stub checks to see if it has a cached fd, and
| if so uses it.
| 
| If not, it tries the syscall first, and falls back to /dev/clockctl if
| the syscall fails.
| 
| This approach makes sense, so I will treat the code as "definitive"
| and I will update the man pages accordingly.

Sounds good to me!

christos


Home | Main Index | Thread Index | Old Index