monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Re: Automate stdio chunk size


From: Thomas Keller
Subject: Re: [Monotone-devel] Re: Automate stdio chunk size
Date: Mon, 10 Jul 2006 18:50:01 +0200
User-agent: Thunderbird 1.5.0.2 (X11/20060501)

We can't use an in-stream EOF token, because the stream should be
binary-safe. So this means prefixing each data chunk with the size of
that chunk. A chunk is output when it reaches the maximum size (because
having a known maximum size seems convenient), or when the stream is
flushed (my understanding is that this is the Right Thing to do, plus it
could be nice if we have commands that take a long time to finish).

Well, the EOF token wouldn't really have to be '\0', just something a parser could distinguish from the normal output flow. F.e. in emails the header is separated from the body by double newlines \n\n. If basic_io would become standard for all output of the automation interface there could even be some well-defined end token there, like

...

command_finished "1234..."

where the 1234... part could be the checksum for the complete output echoed before that token.

Thomas.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]