Mail Archives: djgpp/1996/07/03/11:45:42
Xref: | news2.mv.net comp.os.msdos.djgpp:5612
|
From: | s0052mol AT sun10 DOT vsz DOT bme DOT hu (Molnar Laszlo)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Bug in stubify.c
|
Date: | 3 Jul 1996 12:27:24 GMT
|
Organization: | Technical University of Budapest
|
Lines: | 49
|
Message-ID: | <4rdovc$asl@goliat.eik.bme.hu>
|
NNTP-Posting-Host: | sun10.vsz.bme.hu
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hi!
I've found a bug in stubify.c. This caused lost clusters when the
disk became full, or write() failed (fortunately I noticed it on a ramdisk).
The problem is, that it tries to delete the output file before closing it.
(As the Interrupt List 50 says this is not a problem with dr-dos, or when
share.exe is loaded.)
Bye, ML
So here is the diff:
-------------------cut----------------cut--------------cut---------------
*** stubify.co Sun Nov 5 22:32:32 1995
--- stubify.c Fri Jun 28 01:17:10 1996
***************
*** 155,161 ****
{
perror(ofname);
- unlink(ofilename);
close(ifile);
close(ofile);
exit(1);
}
--- 155,161 ----
{
perror(ofname);
close(ifile);
close(ofile);
+ unlink(ofilename);
exit(1);
}
***************
*** 163,169 ****
{
fprintf(stderr, "%s: disk full\n", ofname);
- unlink(ofilename);
close(ifile);
close(ofile);
exit(1);
}
--- 163,169 ----
{
fprintf(stderr, "%s: disk full\n", ofname);
close(ifile);
close(ofile);
+ unlink(ofilename);
exit(1);
}
- Raw text -