December 18, 2017, 02:47:58 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: How to find File Descriptors Leak using API calls  (Read 2053 times)

Offline rheosiva

  • New Member
  • Posts: 2
How to find File Descriptors Leak using API calls
« on: March 31, 2009, 12:06:54 PM »
how to check file descriptors leak.. using a C program..
which Specific call is should be used to achieve this...
Please help me regards

Offline dragoncity99

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 551
Re: How to find File Descriptors Leak using API calls
« Reply #1 on: October 29, 2009, 04:05:41 PM »
Errr...do you mean file locks ?

1. Use fuser or lsof to identify the processes holding it up.

2. If memory leak, use valgrind for example.

3. If you can suspect a process is the culprit, run an strace against that process.