commit 8ddd819574c2d982571e2c32555a9d9954dd2565 parent 7f4368fca698cf76e75df23981fcba02df153fa9 Author: sin <sin@2f30.org> Date: Sat, 16 Nov 2013 14:02:03 +0000 Check if stdin is indeed referring to a terminal Diffstat:
M | rs.c | | | 3 | +++ |
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/rs.c b/rs.c @@ -141,6 +141,9 @@ main(int argc, char *argv[]) usage(); } ARGEND; + if (!isatty(STDIN_FILENO)) + eprintf("isatty: stdin:"); + ftdi_init(&ftdictx); ftdi_set_interface(&ftdictx, INTERFACE_ANY);