🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #1058

detect how many files are open

#1058
From: Josef Halder
Date: Sat, 17 Nov 2007 11:02
17 lines
1409 bytes
Hi,

is there a way to detect how many files are open at the moment?
My problem is when the program is running two weeks or longer without
restart then comes a point after that is not longer possible to open (to
read or to write) a file. After that point any attempt to open a file,
generates an error.
I belive there is a situation a file is not closed. But the program is very
complex so it's difficult to find out.

Example:
At various times during the program is running I open files with   FILE *f =
fopen("Filename.TXT","rt");
I read/write and after that I close with    fclose(f);

Thanks for help
Josef
Technical Details
Message-ID: <473eca61$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,da0bfab45ef29be4,start
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Josef Halder" <no_spam@email.xxx>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: detect how many files are open
Date: Sat, 17 Nov 2007 12:02:58 +0100
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 87.139.121.224
Message-ID: <473eca61$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1195297377 87.139.121.224 (17 Nov 2007 03:02:57 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail