On Tue, Aug 16, 2005 at 04:07:04AM -0400, Scott Schwartz wrote:
> | Is this a terrible idea? (I'm trying to address the lack of technical 
> | discussion mentioned  an earlier note :0)
> 
> In my humble opinion, the better solution is to have dial return
> a pair of descriptors (and change the rest of the system to have
> e.g. /net/tcp/9/data{0,1}), so you can close the one you want.
> 
> But maybe it's too late for that, and changing close is the only way.

I fancied having a 'split' call that would act a bit like a collision
between dup and pipe;  it would return 2 fds - a read only and a write
only.   So one could then do:

int bidir_fd;
int unidir_fds[2];

split(bidir_fd, unidir_fds);
close(bidir_fd);

/* Use unidir_fd[0] and unidir_fd[1] */

DF

Reply via email to