* Tim Newsham <news...@lava.net> wrote: > ps. if you wanted to hide this ugliness of passing a buffer and > fd to a child process instead of just passing an fd, you could > still solve it in userland without a syscall. Write a library > that does buffered IO. Include unget() if you like. Write the > library in a way that you can initialize it after a fork/exec > to pick up state from the parent (ie. by taking two fds, > reading the buffer from the first, and continuing on with the > 2nd when it is exhausted).
Not sure how things work on Plan9, but on GNU/Linux you could even use LD_PRELOAD to overlay the read() libc function to hide that magic, or even tweak libc for that. BTW: how to do you in general think about having tweaked libc's instead of all these "cross-platform libraries" ? For example, I'm thinking about whether it's worth to change uclibc in a way that it allows to plug-in userland-vfs'es. cu -- ---------------------------------------------------------------------- Enrico Weigelt, metux IT service -- http://www.metux.de/ phone: +49 36207 519931 email: weig...@metux.de mobile: +49 174 7066481 icq: 210169427 skype: nekrad666 ---------------------------------------------------------------------- Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme ----------------------------------------------------------------------