1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

Avoid config stdin if not a tty

Allow to run miracle-sinkctl as a service

relates to #98
This commit is contained in:
albfan 2017-04-05 07:51:04 +02:00
parent 04a1ec8aa3
commit b8de12cab3

View file

@ -317,6 +317,7 @@ int cli_init(sd_bus *bus, const struct cli_cmd *cmds)
} }
} }
if (isatty(fileno(stdin))) {
r = sd_event_add_io(cli_event, r = sd_event_add_io(cli_event,
&cli_stdin, &cli_stdin,
fileno(stdin), fileno(stdin),
@ -327,6 +328,7 @@ int cli_init(sd_bus *bus, const struct cli_cmd *cmds)
cli_vERR(r); cli_vERR(r);
goto error; goto error;
} }
}
cli_rl = true; cli_rl = true;