Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

ioctl(FIONREAD) doesn't return bytes in pipe

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum >> ioctl(FIONREAD) doesn't return bytes in pipe Page: [1]
Login
Message << Older Topic   Newer Topic >>
ioctl(FIONREAD) doesn't return bytes in pipe - Jul. 12, '06, 3:16:34 PM   
gregmb

 

Posts: 27
Status: offline
When I use ioctl(pipefd, FIONREAD, &bytes)

it always returns Zero even though I just wrote x bytes into the write side of the pipe.

Is this a know bug?

Greg
Post #: 1
RE: ioctl(FIONREAD) doesn't return bytes in pipe - Jul. 12, '06, 3:36:04 PM   
gregmb

 

Posts: 27
Status: offline
further investigate show that the ioctl() returns an error reporting 'Invalid Argument'

which I seems to be the pipe fd.

Is there some other way to get the number of bytes in a pipe?

Greg

(in reply to gregmb)
Post #: 2
RE: ioctl(FIONREAD) doesn't return bytes in pipe - Jul. 12, '06, 3:48:45 PM   
Rodney

 

Posts: 3714
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
The only ioctl() supported for pipes is FIONBIO on 3.5
I don't know if this has changed for later versions.
You can use select() to indicate whether something is available to be read.

(in reply to gregmb)
Post #: 3
RE: ioctl(FIONREAD) doesn't return bytes in pipe - Jul. 12, '06, 10:54:21 PM   
markfunk

 

Posts: 670
Joined: Mar. 31, '03,
Status: offline
As far as I remember, there is no way to determine the number of bytes
currently in the pipe.

(in reply to Rodney)
Post #: 4
Page:   [1]
All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum >> ioctl(FIONREAD) doesn't return bytes in pipe Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.047