Hacker Newsnew | past | comments | ask | show | jobs | submit | grodriguez100's commentslogin

CLOCK_MONOTONIC is affected by NTP skewing but should still always increase monotonically (i.e. never decrease)

What happens if someone makes an honest mistake (or is just malicious) and makes their NTP server run fast?

It's system dependent but Linux will generally speed up or slow down the time advancement until the delta from adjtime(...) matches up:

https://linux.die.net/man/2/clock_gettime

   This clock is not affected by discontinuous jumps in the system time (e.g., if the system administrator manually changes the clock), but is affected by the incremental adjustments performed by adjtime(3) and NTP.
https://linux.die.net/man/3/adjtime

   If the adjustment in delta is positive, then the system clock is speeded up by some small percentage (i.e., by adding a small amount of time to the clock value in each second) until the adjustment has been completed. If the adjustment in delta is negative, then the clock is slowed down in a similar fashion.

Sounds very good, and I can see many use cases in embedded systems. But that probably requires 32-bit arm support. Is that planned ?

As of right now no - my primary target when developing this was realtime and games in particular since that's what I know best, but if there's a real target in embedded that's certainly something that could be explored.

Looks like I misinterpreted both embedded and real-time then.

I don’t think “web searches” requires “a deep level of technical literacy”…


Can’t help reading that as “Skynet” every time.


> I actually set a piece of homework "marking" chatGPT, which went well and students seemed to enjoy!

This. This should be done everywhere. It is the best way to let students see first hand that LLM output is useful, but can be (and often is) wrong.

If people really understands that, everything will be better.


This is actually a well known technique, often called the self-pipe trick. There’s a good overview in the following SO answer from Rich Felker, muslc’s author:

https://stackoverflow.com/questions/3703013/what-can-cause-e...


The technique described in the SO answer doesn't really apply here, since the write end of the pipe would be closed on exec in that case. Whereas in this case they're waiting for it to be closed after the child dies.


Sure, it may not apply in this specific case. But you said “This is the first I've heard of using an open pipe to poll for subprocess termination” and I was just pointing out that this is a well known technique.


They actually did B:

“[…] if the environment variable STDDATA_FD is present or set to the descriptor to produce the JSON output on.


ZeroSSL works very well for me. I found it because it is now the default for the acme.sh client.


Old Macs (pre-OS X I think) used CR only as line terminators.


Yes, you’re right. I completely forgot about them.

I can’t imagine anyone targeting macOS 9 (or earlier) systems these days but you’re right that it’s an edge case people should be aware of.


a) Correct. b) Not relevant. The license says what it says regardless of what upstream does or doesn’t do. If someone wants to use the code they should comply with the license requirements.

A README is often included with binaries. That’s a good place to include any licensing information.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: