]> rtime.felk.cvut.cz Git - sojka/can-utils.git/commit
slcanpty: probe stdin capabilities at startup
authorOliver Hartkopp <socketcan@hartkopp.net>
Tue, 11 Jun 2013 20:21:38 +0000 (22:21 +0200)
committerOliver Hartkopp <socketcan@hartkopp.net>
Tue, 11 Jun 2013 20:21:38 +0000 (22:21 +0200)
commitc05267facaba6d42c9e86a44b0c413908c781a7e
treeec1a9460f24162921e6cd642695a8105d0bfd654
parentd469336649a24b1c36bcb3e25e14d29451733d63
slcanpty: probe stdin capabilities at startup

/dev/null returns EOF therefore select() finishes immediately.
Now EOF is probed on start.

Other /dev/null as stdin workarounds:
- lscanpty ... < /dev/ptmx (dirty but works)
- cat </dev/null | slcanpty ... (doesn't work for me and even the patch
  is "disabled" then)

Signed-off-by: Janusz Uzycki <j.uzycki@elproma.com.pl>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
slcanpty.c