[ntp:hackers] Simplifying NTPD

Danny Mayer mayer at ntp.org
Wed Jul 2 11:56:43 UTC 2014

On 7/1/2014 3:08 PM, Poul-Henning Kamp wrote:
> In message <53B2EBA8.5030307 at ntp.org>, Danny Mayer writes:
>> On 6/30/2014 10:58 AM, Poul-Henning Kamp wrote:
>> We need to look at the overall design before making an architectural
>> decision like that. The biggest problem with things like stdout is that
>> a service has no standard output and you need to redirect it elsewhere.
> We are not talking about an unrelated process, so forget about the
> local environment of services: we are talking about a process
> specifically fork+exec'ed from NTPD.
> NTPD will set the stdout for the child process to point the right
> place.
> On UNIX, it is natural to use a pipe(2).
> On platforms without pipe(2) any other byte stream which can be
> mapped onto stdout can be used: UNIX sockets, TCP connections etc.
> This is really not complicated at all -- that's the entire point.

If you use a pipe that will be fine. fork+exec would have to be dealt
with separately on Windows, probably as a child process. As long as we
can isolate the O/S specific parts into its own libraries it will be
much simpler to implement. Been there, done that.


More information about the hackers mailing list