[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <465DF0F5.6050000@redhat.com>
Date: Wed, 30 May 2007 14:47:33 -0700
From: Ulrich Drepper <drepper@...hat.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
CC: Ingo Molnar <mingo@...e.hu>, Jeff Garzik <jeff@...zik.org>,
Zach Brown <zach.brown@...cle.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Arjan van de Ven <arjan@...radead.org>,
Christoph Hellwig <hch@...radead.org>,
Andrew Morton <akpm@....com.au>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Evgeniy Polyakov <johnpol@....mipt.ru>,
"David S. Miller" <davem@...emloft.net>,
Suparna Bhattacharya <suparna@...ibm.com>,
Jens Axboe <jens.axboe@...cle.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: Syslets, Threadlets, generic AIO support, v6
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Linus Torvalds wrote:
> Well, don't think of it as a special case at all: think of bit 30 as a
> "the user asked for a non-linear fd".
This sounds easy but doesn't really solve all the issues. Let me repeat
your example and the solution currently in use:
problem: application wants to close all file descriptors except a select
few, cleaning up what is currently open. It doesn't know all the
descriptors that are open. Maybe all this in preparation of an exec call.
Today the best method to do this is to readdir() /proc/self/fd and
exclude the descriptors on the whitelist.
If the special, non-sequential descriptors are also listed in that
directory the runtimes still cannot use them since they are visible.
If you go ahead with this, then at the very least add a flag which
causes the descriptor to not show up in /proc/*/fd.
You also have to be aware that open() is just one piece of the puzzle.
What about socket()? I've cursed this interface many times before and
now it's biting you: there is parameter to pass a flag. What about
transferring file descriptors via Unix domain sockets? How can I decide
the transferred descriptor should be in the private namespace?
There are likely many many more problems and cornercases like this.
- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFGXfD12ijCOnn/RHQRAk4nAJ0Zjevd9Y0lQa/fLzKK+BshcLVbngCfSspI
ALNKu8VCKy7CvoIqJD3Xs/Y=
=+fM8
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists