Document what happens when the update aborts commands

This commit is contained in:
Markus Armbruster 2008-04-28 22:24:36 +02:00
parent c66e8319ee
commit 4f40ea04d8

View file

@ -48,11 +48,12 @@ clients. Likewise, overlong or malformed UTF-8 sequences should not
occur and may be ignored. occur and may be ignored.
The server prompts for input. Each prompt `consumes' one line of The server prompts for input. Each prompt `consumes' one line of
input (except for C_EXECUTE, which see). Input lines are arbitrary input (except for C_EXECUTE, and when the update aborts a command, as
text, terminated by line feed, which is optionally preceded by described below). Input lines are arbitrary text, terminated by line
carriage return (decimal 13). Lines should not contain ASCII control feed, which is optionally preceded by carriage return (decimal 13).
characters other than horizontal tab. Clients should not send Lines should not contain ASCII control characters other than
overlong or malformed UTF-8 sequences. horizontal tab. Clients should not send overlong or malformed UTF-8
sequences.
A client is called synchronous if it waits for a prompt before it A client is called synchronous if it waits for a prompt before it
sends another line of input. Else it is called asynchronous. sends another line of input. Else it is called asynchronous.
@ -189,12 +190,18 @@ The following ids occur:
Clients with a tty-like user interface are advised to use a similar Clients with a tty-like user interface are advised to use a similar
format, to minimize differences to the examples in info. format, to minimize differences to the examples in info.
* Sub-prompt C_FLUSH * Argument prompt C_FLUSH
The server consumes a line of input and passes it to the currently The server consumes a line of input and passes it to the currently
executing command. Commands usually fail on interrupt. The server executing command. Commands usually fail on interrupt. The server
terminates the session on EOF (but see C_EXECUTE for an exception). terminates the session on EOF (but see C_EXECUTE for an exception).
If an update runs while the server waits for the line of input to
arrive, the current command is aborted. Whether the server consumes
a line of input for this argument prompt is unpredictable. Any
argument prompts it may send before the next command prompt do not
consume input.
Text is a human-readable prompt supplied by the command. Text is a human-readable prompt supplied by the command.
emp_client prints the text verbatim. emp_client prints the text verbatim.
@ -232,7 +239,7 @@ The following ids occur:
batch file. batch file.
While executing the batch file, the server sends no C_PROMPT command While executing the batch file, the server sends no C_PROMPT command
prompts. It still sends C_FLUSH sub-prompts. prompts. It still sends C_FLUSH argument prompts.
Protocol flaw: not sending C_PROMPT here screws up redirections: Protocol flaw: not sending C_PROMPT here screws up redirections:
they apply until the next C_PROMPT, i.e. from start of redirected they apply until the next C_PROMPT, i.e. from start of redirected