kadmin: Support heredocs better to speed up tests
Now we can use heredocs to execute multiple kadmin commands with just one `execve()`: ``` ${kadmin} <<EOF || exit 1 init ... add ... ... EOF ``` This will allow tests to use heredocs in setting up an HDB so as to go a bit faster.
This commit is contained in:
@@ -296,10 +296,13 @@ main(int argc, char **argv)
|
||||
} else {
|
||||
while(!exit_seen) {
|
||||
ret = sl_command_loop(commands, "kadmin> ", NULL);
|
||||
if (ret == -2)
|
||||
if (ret == -2) {
|
||||
exit_seen = 1;
|
||||
else if (ret != 0)
|
||||
} else if (ret != 0) {
|
||||
exit_status = 1;
|
||||
if (!isatty(STDIN_FILENO))
|
||||
exit_seen = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user