Skip navigation.
Home
The QNX Community Portal

View topic - QNX File Descriptor Leak

QNX File Descriptor Leak

For discussion of realtime and/or embedded programming.

QNX File Descriptor Leak

Postby vjeevana » Wed Dec 14, 2016 10:03 am

Working on a platform with below details

QNX localhost 6.3.0 2008/01/15-13:30:11EST IXP_23xx armbe

One of our application process leaks file descriptor. We found that file descriptor leakage happens by print "Too many open files" . Then we verified file leakgae be below program (I have pasted only skeleton/logic of the program)

(dir = opendir ("/proc"))
pid = atoi (dirent -> d_name)
sprintf (paths, "/proc/%d/as", pid);
fd = open (paths, O_RDONLY)
devctl (fd, DCMD_PROC_INFO, &info, sizeof (info), 0)
printf("files allocated %u\n",info.num_fdcons)

In QNX we are not able to find out api which will enable us to find out list of file descriptors and their properties opened by the process.(pidin -o is available only from 6.3.2.. we are using 6.3.0 . sin command is also not supported).
vjeevana
New Member
 
Posts: 3
Joined: Mon Dec 12, 2016 11:07 am

Return to Realtime and Embedded

Who is online

Users browsing this forum: No registered users and 2 guests