[comp.os.mach] Named pipes and Next

eran@adelbert12.stanford.edu (eran yehudai) (09/12/90)

I am writing a utility that uses named pipes (created by 'mknod p
name'). It works fine on suns, decs and even IBM aix. Only today I
found out the NeXT (I'm not sure about Mach in general) does not
support them, and I am looking for a simple alternative.

Is there a *simple* way of creating an effective pipe between two
independent processes? The Speaker Listener mechanism sounds about
right, but I'd rather not go into objective C.
Any ideas?

--
Eran Yehudai
eran@thsun1.slac.stanford.edu

wiml@milton.u.washington.edu (William Lewis) (09/12/90)

In article <ERAN.90Sep11153920@adelbert12.stanford.edu> eran@adelbert12.stanford.edu (eran yehudai) writes:
>I am writing a utility that uses named pipes (created by 'mknod p
>name'). It works fine on suns, decs and even IBM aix. Only today I
>found out the NeXT (I'm not sure about Mach in general) does not
>support them, and I am looking for a simple alternative.
>
>Is there a *simple* way of creating an effective pipe between two
>independent processes? The Speaker Listener mechanism sounds about
>right, but I'd rather not go into objective C.
>Any ideas?

   Well, you could use Unix-domain sockets; they seem sort of
named-pipe-like (IMHO). If you want to be Mach or 
NeXT-specific, you could use Mach ports and the name-server;
unless you use NXStreams though you have to invest a little learning
about "Mach Interface Generator" and details of mach ports (which
I myself still haven't done =8) ). Since this is comp.os.mach + 
comp.sys.next I guess you're not worried about portability off of
a NeXT. Check allocate_port() and NXOpenPort() in the manuals. 
The nameserver is under netname_check_in() and netname_look_up().

-- 
wiml@milton.acs.washington.edu       Seattle, Washington  | No sig under
(William Lewis)   |  47 41' 15" N   122 42' 58" W  |||||||| construction

moose@svc.portal.com (09/13/90)

In article <ERAN.90Sep11153920@adelbert12.stanford.edu> eran@adelbert12.stanford.edu (eran yehudai) writes:
>
>Is there a *simple* way of creating an effective pipe between two
>independent processes? The Speaker Listener mechanism sounds about
>right, but I'd rather not go into objective C.
>Any ideas?

Yes, you use named sockets using the socket and bind commands found in your
lovely man pages.
-- 
Michael Rutman				|	moose@svc.portal.com
Cubist					|	makes me a NeXT programmer
Software Ventures			|	That's in Berkeley
smile, you're on standard disclaimer	|	<fill in with cute saying>