Sean Boudreau(deleted)
|
Re: Trouble with STDIN not triggering select(). Works on Linux, not QNX
|
Sean Boudreau(deleted)
01/24/2008 3:14 PM
post4568
|
Re: Trouble with STDIN not triggering select(). Works on Linux, not QNX
On Thu, Jan 24, 2008 at 03:08:41PM -0500, Zhenwang Yao wrote:
> Hi,
>
> In this project I am demuxing between STDIN and another socket. For some
> reason hitting the enter key does not trigger select(). The QNX select()
> man page mentions this:
>
> [quote]
> Caveats:
>
> The select() function only works with raw file descriptors; it doesn't
> work with file descriptors in edited mode. See the ICANON flag in the
> description of the tcgetattr() function.
> [/quote]
> http://www.qnx.com/developers/docs/6.3.0SP3/neutrino/lib_ref/s/select.html
>
> So my guess is that by default stdin is in edit mode. Is my assumption
> correct? If so, can someone provide some code that would make select()
> work for stdin?
>
> Thank you!
You shouldn't assume a default termios setting. You should
always save what you inherit, set what you want, restore
what you inherited on exit. See tcgetattr(), tcsetattr().
What manager is handling STDIN?
-seanb
|
|
|
Zhenwang Yao
|
Re: Trouble with STDIN not triggering select(). Works on Linux, not QNX
|
Zhenwang Yao
01/24/2008 3:15 PM
post4569
|
Re: Trouble with STDIN not triggering select(). Works on Linux, not QNX
Sorry, I should have put it in another area.
I have now posted it in the General topic, so can anyone please delete this thread from here. thanks.
|
|
|