From: Robert W. <rj...@du...> - 2003-04-20 21:50:38
|
Hi all, The attached patch to the CVS head tracks open file descriptors and dumps them out at the end of the run. If you don't specify any command-line options, you get a summary indicating how many fds are still open. If you specify --fd-list=yes, you get a more verbose list showing the filename (if it exists) for each open file descriptor, along with a backtrace from the point where it was opened. If the fd was inherited from the parent process, no backtrace is produced. The patch knows about file descriptors created by the following system calls: open, dup, dup2, pipe, socket, socketpair and accept. It also knows about file descriptors passed between processes using usix-domain socket cmsg's. Please let me know if I've missed any important calls. The patch also adds VG_(lseek), VG_(readlink) and VG_(getdents) to vg_mylibc, which some other people might find useful too. Regards, Robert. -- Robert Walsh Amalgamated Durables, Inc. - "We don't make the things you buy." Email: rj...@du... |