Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > how to set buffered output in Unix?

how to set buffered output in Unix?
Thread Tools
tie
Professional Poster
Join Date: Feb 2001
Status: Offline
Reply With Quote
May 26, 2001, 08:15 PM
 
I have a simple command-line C program, dumping its output into a text file. I'd like to make the output unbuffered. How do I do this? (Something like system("stty ..")?)

[Edit: the subject line should say unbuffered.]

[This message has been edited by tie (edited 05-26-2001).]
The 4 o'clock train will be a bus.
It will depart at 20 minutes to 5.
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
May 27, 2001, 07:49 AM
 
How 'bout

void setbuf(FILE *stream, char *buf)?

(Using NULL as char *buf)
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
   
Thread Tools
Forum Links
Forum 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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:15 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2