Rather than just ignoring the offset, you should check for -1 and return
ESPIPE otherwise, so pread/pwrite fail as they should.

I'd say you should use getdport at the beginning and use io_read and the
like directly instead of read.  That is more efficient and also shows what
the client calls look like.  But if you are deliberately using the POSIX
calls to make the example more clear, then you should change io_readable to
ioctl(,FIONREAD) and have it be complete.

You're using fork2 just to avoid zombies, right?  I would say that you
should instead do a simple reaping loop with WNOHANG at convenient times
like when you read EOF on a pipe.  That also gives you the opportunity to
print an error if you have a stderr and the spawned program exits abnormally.

I don't like the name /hurd/run so much.  Maybe /hurd/pipeto?

_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd

Reply via email to