On Mon, 2006-07-10 at 18:50 +0200, Thomas Keller wrote:
> > 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

basic_io is not always appropriate, for example "automate get_file".
This command also means that the output stream can contain arbirtrary
binary data, so no in-stream EOF token would be safe.

Tim




_______________________________________________
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to