X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f Date: Mon, 11 Apr 2005 06:38:48 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp-workers AT delorie DOT com Message-ID: <01c53e48$Blat.v2.4$1e183ec0@zahav.net.il> Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=ISO-8859-1 X-Mailer: emacs 22.0.50 (via feedmail 8 I) and Blat ver 2.4 In-reply-to: (message from Brian Inglis on Sun, 10 Apr 2005 17:13:28 -0600) Subject: Re: DJGPP v2.04 Bugs - suggested patch References: <10504092012 DOT AA16787 AT clio DOT rice DOT edu> <200504101156 DOT j3ABu1k5002657 AT speedy DOT ludd DOT ltu DOT se> <01c53e00$Blat.v2.4$eacdb8c0 AT zahav DOT net DOT il> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Sun, 10 Apr 2005 17:13:28 -0600 > From: Brian Inglis > > >Isn't it easier to install a SIGINT signal handler, which will fflush > >the stream and exit? > > The issue is the amount of data in the library buffer to be flushed to > the OS: once there's too much in the buffer, the write will not > complete and you'll get an error; so you have to reduce the write > granularity near the end Perhaps I misunderstood: I thought the issue was how to produce the max size file even though the last chunk somehow causes the program to hang in some seemingly endless loop, and Ctrl-C is needed to break that. In principle, there should be no reason to increase the granularity near the end: the last write will indeed get an error, but before it does, it will write as many bytes as the OS allows to the disk. So what we should see is an error and a 4GB file, and that's it. Therefore, I think we have some kind of bug here, which should be investigated. The trick with a signal handler is just a means to ease that investigation.