Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Asynchronous File I/O on Linux



I found a nice reference:
http://davmac.org/davpage/linux/async-io.html
Asynchronous I/O on linux
or: Welcome to hell.

If I recall, Linus has always been against asynchronous I/O in Linux.

The bottom line here is that all I/O file I/O goes through the file
system's driver.


On 05/15/2010 11:11 PM, Bill Bogstad wrote:
> On Sat, May 15, 2010 at 5:56 PM, Mark Woodward <markw-FJ05HQ0HCKaWd6l5hS35sQ at public.gmane.org> w=
rote:
>  =20
>> Bill Bogstad wrote:
>>    =20
>  =20
>> OK, so, the methodology is quite similar, fine. Now the question remai=
ns, is
>> it possible to quickly "clone" an existing file handle so that it will=
 be a
>> new and distinct file handle with the same permissions and modes with =
its
>> own distict view of current location, i.e. seek on one does not affect=
 seek
>> on the other?
>>    =20
> The closest that I can think of involves /proc/self/fd.   It doesn't
> do same permissions/modes, but does
> give you different seek pointers.  I suspect it only works with
> seekable (i.e. disk file) file descriptors...
>
> /* crappy (uncompiled) code follows */
> sprintf(bigbuf, "/proc/self/fd/%d", oldfd);
> newfd =3D open(bigbuf, flags);
>
>  =20


--=20
Jerry Feldman <gaf-mNDKBlG2WHs at public.gmane.org>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB  CA3B 4607 4319 537C 5846








BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org