nanogui: reading the keyboard
Subject:
Re: [nanogui] reading the keyboard
From:
"Greg Haerr" ####@####.####
Date:
10 Dec 2005 20:44:49 +0000
Message-Id: <010801c5fdca$99a86be0$6401a8c0@gregnewport>
> I am trying to run nano-X progs from init....
> So, how do I read the keyboard?
>
> Or, how do I automatically start (and restart) nano-X apps so that they
> have access to the keyboard input?
The problem with keyboard input from app started from init
isn't usually handling the read code differently, but instead
has to do with opening the correct tty, and handling the
problems resulting from not having a "controlling" tty.
I can't remember all the details offhand, but UNIX kernels
used to handle tty reads differently after fork() and other
times depending on whether the process had a controlling
tty. Also, there are sometimes differences when apps
assume that 0,1 & 2 are open.
You didn't mention your open code, does this application
work entirely correctly not from init?
Regards,
Greg