Re: CFFileDescriptor and stdin
Re: CFFileDescriptor and stdin
- Subject: Re: CFFileDescriptor and stdin
- From: Terry Lambert <email@hidden>
- Date: Tue, 9 Sep 2008 01:22:48 -0700
On Sep 6, 2008, at 1:37 PM, Nicolas Roussel wrote:
In general, you should avoid multiple layers of buffering. I would
suggest turning buffering off at the stdio layer using setbuf(3).
I agree. But I'm not using stdio. I shouldn't have said "stdin"...
I'm simply passing 0 as the file descriptor parameter to
CFFileDescriptorCreate. And I'm not using any Carbon or Coca stuff
for the moment (check the code in my first message).
It seems others have had problems try to detect user input on the
terminal with kqueue:
http://lists.apple.com/archives/Unix-porting/2006/Jan/msg00072.html
http://lists.apple.com/archives/Unix-porting/2006/Jan/msg00084.html
Could this be related to my problem with the CFFileDescriptor?
Try fstating fd 0 and looking at the S_IFMT bits in the st_mode field
and see what flags are set in it. If it's a character or block
special device, look at the major and minor fields of the st_dev and
match them to a device in /dev.
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden