How to read the keyboard when stdin redirected
Darren Drapkin
darren.drapkin at ntlworld.com
Thu May 14 09:17:15 UTC 2026
On Wednesday, 13 May 2026 at 18:13:06 UTC, Adam D. Ruppe wrote:
> Open /dev/tty as a file and read from it.
I have tried opening /dev/tty like this:-
auto my_in = File("/dev/tty", "r");
Then I read from it later on like this :-
my_in.readf(" %s",&response);
But the programme, just hangs there waiting for input and doing
nothing.
More information about the Digitalmars-d-learn
mailing list