🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.msdos.programmer
1 messages
1 total messages Started by Judy Bettinger Thu, 07 Jan 1993 19:43
Trouble with I/O commit()
#7513
Author: Judy Bettinger
Date: Thu, 07 Jan 1993 19:43
35 lines
1839 bytes

Does anyone now of a way to force the low-level C write() function to flush
the buffer to the disk?  A call to commit() isn't doing anything.

Details:

Our environment is Windows 3.1 running under MS-DOS 5.0 and we're using
Microsoft C 7.00.  The routine we're trying to write just runs in a DOS
window.  The write() call is embedded in a database package
called CBase, but we do have the source -- that's how I've been able
to experiment with it.  I've been testing by running the process that 
does the writing in a Codeview window and just doing 'type' from another
DOS window.

What we've tried so far:

First, we checked to see if good 'ol stream I/O (fopen, etc.) would
successfully do an fflush().  We finally discovered (no thanks to the
Microsoft support line) , that we needed to call fopen with
the "c" option and bind in commode.obj.  No problem, stream I/O will now
flush properly.  However, when we switch back to cbase, which uses the low-
level routines, we don't see anything written out until we close the file. 
We've tried not running smartdrv and I added a call to commit() to the 
write routine, but no luck.

I had thought that the low-level routines didn't buffer in the first place, 
but it 'pears I was mistaken.

Anybody got any ideas?
-- 
#include <std_disclaimer.h>
Judy Bettinger  (judy@evolving.com)
Evolving Systems, Inc.
Denver, Colorado
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads