Date: Wed, 4 Sep 1996 13:34:04 -0300 Message-Id: <1.5.4.16.19960904104126.380f5832@dmeasc.rc.ipt.br> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: "John M. Aldrich" , djgpp AT delorie DOT com From: Cesar Scarpini Rabak Subject: Re: interrupting with ctrl-C At 18:44 03/09/96 -0700, John M. Aldrich wrote: >Jeffrey Taylor wrote: >> >> Eli Zaretskii (eliz AT is DOT elta DOT co DOT il) wrote: >> : `fflush' is not enough when redirection is used, or when you invoke a >> : child program that reads from a file written by the parent. You should >> : either close the file or call `fsync' to ensure DOS flushes its buffers. >> : `fflush' only flushes the DJGPP buffers, but not the DOS ones. >> >> If you are using SMARTDRV, its buffers need to be flushed too. Off the >> top of my head, I would spawn a call to run "smartdrv /c" > >What, every time you write to the file? You'd completely bog down your >program! Even if it crashes, as long as it returns to the DOS prompt, >SMARTDRV writes all the data. Of course, this doesn't apply in the case >of hard crashes, but how safe do you need to get?! Also, unless I miss >my guess, calling SMARTDRV causes it to be loaded if it is not already-- >do you really want to do this to some unsuspecting user? > >P.S.: If you really, really, REALLY want to be safe, turn off SMARTDRV's >write caching, either manually before you run the program or via a spawn >when the program starts up. The switch to turn off all write caching is >"/x". > In the DJGPP FAQ there is even a better alternative to /X which is using /N/C! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cesar Scarpini Rabak E-mail: csrabak AT ipt DOT br DME/ASC Phone: 55-11-268-35221Ext.350 IPT - Instituto de Pesquisas Tecnologicas Fax: 55-11-268-5996 Av. Prof. Almeida Prado, 532. Sao Paulo - SP 05508-901 BRAZIL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~