[ntp:questions] No libntp.so

Uwe Klein uwe_klein_habertwedt at t-online.de
Thu Aug 28 15:18:56 UTC 2008


Kay Hayen wrote:

> I don't think it's a lack of our sides to fflush. Without a tty, ntpq itself 
> will not flush I think. So when using pipes, we have to close stdin, which 
> will make it flush its output due to exiting.
> 
> And to not have a visible zombie (for too long), we need to wait for its exit 
> code too.
As I wrote before that is the reason why ptys exist.
( and the mechanism used by expect to talk to spawned processes ).

man openpty, login_tty, forkpty

forkpty() followed by exec*() in the child is probably what you want.
you will then have a child that reacts in a linebuffered way like
you are used  from interactively run apps.

uwe




More information about the questions mailing list