I have a large C program running on AIX that seems to be consistently leaving an additional 2 files open after processing its input. There are several calls to tempnam and corresponding calls to unlink to remove the temp files after use. It looks like I've maybe missed a couple of unlinks somewhere, but I haven't been able to track them down.
I've been looking at the lsof command, but this only seems to tell me which filesystem the files are opened on. Is there any way to find out the filenames that are currently opened by my process?
I don't mind if I need to do this via my C program, or from a Unix commmand.
Thanks in advance for any help.
I've been looking at the lsof command, but this only seems to tell me which filesystem the files are opened on. Is there any way to find out the filenames that are currently opened by my process?
I don't mind if I need to do this via my C program, or from a Unix commmand.
Thanks in advance for any help.