Messages in this thread | | | Date | Tue, 16 Jan 2001 14:48:49 +0100 | From | Jamie Lokier <> | Subject | Re: Is sendfile all that sexy? |
| |
Felix von Leitner wrote: > I cheated. I was only talking about open(). > close() is of course more expensive then. > > Other than that: where does the requirement come from? > Can't we just use a free list where we prepend closed fds and always use > the first one on open()? That would even increase spatial locality and > be good for the CPU caches.
You would need to use a new open() flag: O_ANYFD. The requirement comes from this like this:
close (0); close (1); close (2); open ("/dev/console", O_RDWR); dup (); dup ();
-- Jamie - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
| |