daemon: dev-output command.

Useful for controlling conversations between two nodes, by
blocking one's output.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-05-26 15:25:24 +09:30
parent 97bc4ed0cb
commit b9d4f7c0ab
7 changed files with 79 additions and 4 deletions

View File

@@ -96,8 +96,11 @@ int main(int argc, char *argv[])
method, idstr);
for (i = 2; i < argc; i++) {
/* Numbers are left unquoted, and quoted things left alone. */
/* Numbers and bools are left unquoted,
* and quoted things left alone. */
if (strspn(argv[i], "0123456789") == strlen(argv[i])
|| streq(argv[i], "true")
|| streq(argv[i], "false")
|| argv[i][0] == '"')
tal_append_fmt(&cmd, "%s", argv[i]);
else