Quick close of all the open files.

From: vamsi krishna
Date: Tue Jun 06 2006 - 17:44:38 EST


Hello,

I found that the following code is closing all the open files by the
program, do you think its a bug in kernel code?

------------
fp = tmpfile();
fp->_chain = stderr;
fpclose(fp);
fp = NULL;
------------

o Is there any other elegant way to close all the open files (rather
than reading from /proc/<pid>/fd and calling close on each of the fd?)

Looking forward to hear from you.

Thank you,
Vamsi.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/