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 _______________________________________________ questions mailing list [email protected] https://lists.ntp.org/mailman/listinfo/questions
