connecting file descriptors

Dave Horsfall dave at pta.OZ
Tue Sep 23 10:29:38 AEST 1986


Dear all,

Is there a way to connect together two file descriptors?  In my
application, I have an array of pipe fd's, and an fd returned from
an accept() call.  I want to connect the accept'ed fd to a particular
pipe fd.  In other words, I want a process to start reading from
that socket.

One hideous way is to spawn a "cat" in the middle of the file
descriptors, with attendant close's and dup's, but there must
be a better way ...

Mail replies are preferred, since it takes forever to read this
newsgroup at 1200 baud, and I'm currently about 200 articles behind!
--
Dave Horsfall VK2KFU	 ISD: +61 2 438-1266  TLX: AA23066
SUN Computer Australia	 STD:  (02) 438-1266  FAX: +61 2 923-2570
20 Waltham St		 ACS: dave at pta, dave at runx
Artarmon  NSW  2064	UUCP: seismo!munnari!pta.oz!dave
AUSTRALIA		ARPA: dave%pta.oz at seismo.arpa
	"ADA - from the people who brought you COBOL"



More information about the Comp.unix.wizards mailing list