LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Closed Thread
 
Search this Thread
Old 10-30-2004, 06:34 AM   #1
suchi_s
Member
 
Registered: May 2004
Posts: 133

Rep: Reputation: 15
turn off buffering


Which one of the following turns off buffering for stdout?
Choice 1
setbuf( stdout, FALSE );
Choice 2
setvbuf( stdout, _IONBF );
Choice 3
setvbuf( stdout, NULL );
Choice 4
setbuf( stdout, _IONBF );
Choice 5
setbuf( stdout, NULL );
 
Old 10-30-2004, 07:08 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,533

Rep: Reputation: 148Reputation: 148
No, no, no... Definitelly homework. It's an easy question. You have it in 'man setbuf'.
 
Old 10-30-2004, 07:14 AM   #3
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Are you filling some sort of query there?

Choice 5 does it, because it is an alias for
Code:
setvbuf(stdout,NULL, _IONBF, 8192)
, but for explicitly set buffering off
I would use command
Code:
setvbuf(stdout,NULL,_IONBF,0)
.
 
  


Closed Thread


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
Triple buffering question Belegdol Linux - Hardware 1 07-01-2005 09:24 PM
pipeline buffering jk3us Linux - Software 2 12-17-2004 07:52 PM
Streams and buffering problem MadCactus Programming 2 02-17-2004 01:32 PM
Regarding buffering with streams karthikvina Programming 0 09-04-2003 02:48 AM


All times are GMT -5. The time now is 10:30 AM.

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