fopen fails

Joined
Aug 31, 2006
Messages
1
Reaction score
0
Hi,

I am writing a program in C. My program deals a lot with file opening (and therefore file closing), because it has several looping as well.

Basically, at some point, it fails to open a file that "physically" exist. I looked into the fd part of the process (ie. cd /proc/10128, cd fd, ls). I see a lot of numbers (representating the file descriptors i suppose).

I was wondering, if i call fclose for every fopen, then should the list of file descriptors (the number in "fd" directory of the process) be reduced?

I hope someone can give me some suggestions/comments on what could have happen to my program that makes it fails to open a file that does exist.

Thanks,

Sakura
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

fopen 20
PHP failed to create file 13
fd leak in parent process for logger. 1
fopen() questions 17
URGENT 1
fopen question 7
fopen - file and directories ?? 15
Access violation reading location 0

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top