Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-04-2003, 02:48 AM   #1
LQ Newbie
Registered: Jul 2003
Posts: 8

Rep: Reputation: 0
Regarding buffering with streams

I could able to do the follwoing thing in linux, aix but not in IRIX.

cat testfile.dat | testprog

testfile.dat is the input to testprog.

testprog could able to get all the input properly in Linux without using setbuf in "testprog"but failed in IRIX. So when I used

setbuf(stdin, NULL) in "testprog" where I am opening stdin explicitly it worked well. Can anyone explain me what is going on explaining me the usage of setbuf, setvbuf with clear understanding using streams. I jst hve a vague idea and made it work.

with regards,


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kaffeine always Buffering AvatarofVirgo Linux - General 1 10-13-2005 04:46 AM
pipeline buffering jk3us Linux - Software 2 12-17-2004 07:52 PM
turn off buffering suchi_s Programming 2 10-30-2004 07:14 AM
Streams and buffering problem MadCactus Programming 2 02-17-2004 01:32 PM
Control stdin buffering weeny Linux - General 0 10-27-2003 06:17 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:49 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration