mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Quick close of all the open files.
@ 2006-06-06 21:45 vamsi krishna
  2006-06-06 21:56 ` Valdis.Kletnieks
  2006-06-07 11:12 ` linux-os (Dick Johnson)
  0 siblings, 2 replies; 11+ messages in thread
From: vamsi krishna @ 2006-06-06 21:45 UTC (permalink / raw)
  To: linux-kernel

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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-06-07 11:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-06 21:45 Quick close of all the open files vamsi krishna
2006-06-06 21:56 ` Valdis.Kletnieks
2006-06-06 22:02   ` vamsi krishna
2006-06-06 22:39     ` Måns Rullgård
2006-06-07  0:33     ` Valdis.Kletnieks
2006-06-07  1:22       ` vamsi krishna
2006-06-07  7:57         ` Måns Rullgård
2006-06-07  8:50         ` Bernd Petrovitsch
2006-06-07  7:56       ` Måns Rullgård
2006-06-06 22:03   ` Måns Rullgård
2006-06-07 11:12 ` linux-os (Dick Johnson)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®