When a bidirection connection with no command is establisehd with a worker
(so "@@<pid>" alone), a "prompt" command is automatically added to display
the worker's prompt and enter in interactive mode in the worker context.
However, till now, an unfinished command line is sent, with a semicolon
instead of a newline at the end. It is not exactly a bug because this
works. But it is not really expected and could be a problem for future
changes.
So now, a full command line is sent: the "prompt" command finished by a
newline character.
/* without any command, simply enter the worker in interactive mode */
if (!ret) {
- const char *cmd = "prompt;";
+ const char *cmd = "prompt\n";
ci_insert(req, 0, cmd, strlen(cmd));
ret += strlen(cmd);
}