Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Trouble with STDIN not triggering select(). Works on Linux, not QNX: (3 Items)
   
Trouble with STDIN not triggering select(). Works on Linux, not QNX  
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!
Re: Trouble with STDIN not triggering select(). Works on Linux, not QNX  
On Thu, Jan 24, 2008 at 03:12:01PM -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?
> 

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
Re: Trouble with STDIN not triggering select(). Works on Linux, not QNX  
Hi,

I'm the one having the select() issue. My friend made the first post while I was having some trouble with the QNX site.

I have determined that it is actually not an issue with STDIN (it does work). But rather select() is simply not trigger 
the 2nd file descriptor for some reason. Please see

http://community.qnx.com/sf/discussion/do/listPosts/projects.community/discussion.community.topc1908


Thank you