Xref: news2.mv.net comp.os.msdos.djgpp:7968 From: ac387 AT yfn DOT ysu DOT edu (randall williams) Newsgroups: comp.os.msdos.djgpp Subject: Update Re: memory overwriting itself?? Date: 22 Aug 1996 03:55:51 GMT Organization: St. Elizabeth Hospital, Youngstown, OH Lines: 21 Message-ID: <4vglo7$16r@news.ysu.edu> References: <4ved7k$gps AT news DOT ysu DOT edu> Reply-To: ac387 AT yfn DOT ysu DOT edu (randall williams) NNTP-Posting-Host: yfn.ysu.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Thanks to those who offered suggestions. I have the problem narrowed down to the system() call. Specificly, I call system(string); where string is "DIR >path\tempfile" constructed from other variables. What happens is after about 11 calls, it creates a zero size file and my read routine crashes because it doesn't expect to find an empty file. It does check to see if the file exists and opened. No files are left open. The order is: make dir file throught system(), open dirfile, read dirfile and process, close dirfile when done reading, and then unlink(dirfile). I just found this tonight. I will probably try to write some independent code to reproduce this if I can. Right now I'm thinking the system call created file isn't being closed properly. It is the only thing I don't have control over. -- PGP key available keyID=148DF819 fingerprint=1A 6F 0C 7F 79 1E 87 8F 86 C2 DF D4 3A CA 8A 3F