www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/09/27/18:00:27

Xref: news-dnh.mv.net comp.os.msdos.djgpp:2225
Path: news-dnh.mv.net!mv!news.sprintlink.net!in2.uu.net!boulder!news.coop.net!news.den.mmc.com!news.orl.mmc.com!mmlab.mml.mmc.com!mmlab.mml.mmc.com!nobody
From: rothweil AT mmlab DOT mml DOT mmc DOT com (Joseph Rothweiler,263E,2481,4611995)
Newsgroups: comp.os.msdos.djgpp
Subject: Problem: Output redirection is using up file handles.
Date: 27 Sep 1995 12:46:45 -0400
Organization: Martin Marietta Laboratories - Baltimore
Lines: 21
Distribution: world
Nntp-Posting-Host: mmlab.mml.mmc.com
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

Here's my problem: I have the following program (tst.c) that
I compiled with djgpp v.2 patchlevel 3:

#include <stdio.h>
main() {printf("Test\n");}

I then create a batch file with the line: tst >tst.out
repeated about 100 times. After about the 55'th line, I get
the message:
"Warning: cannot open swap file c:\tmp\cwsdpmi.swp"
After that, trying to run any command just gives the
error message: "Too many open files in system (ENFILE)"
They system must be rebooted to return to normal operation.
I am running MS-DOS ver. 6.20, with FILES=60.

It looks as if the program opens a file handle every time, and
never releases is when the program exits. Just wondered if
anyone else has run into this problem, and if so, is there
a way around it?


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019