Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!bellcore!faline!ulysses!mhuxt!ihnp4!cbosgd!mandrill!hal!ncoast!allbery From: allbery@ncoast.UUCP (Brandon Allbery) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: Portable inter process communications. Message-ID: <5301@ncoast.UUCP> Date: Fri, 6-Nov-87 18:16:43 EST Article-I.D.: ncoast.5301 Posted: Fri Nov 6 18:16:43 1987 Date-Received: Wed, 11-Nov-87 04:05:39 EST References: <143@tic.UUCP> Reply-To: allbery@ncoast.UUCP (Brandon Allbery) Followup-To: comp.unix.questions Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 22 Xref: mnetor comp.unix.questions:4851 comp.unix.wizards:5395 As quoted from <143@tic.UUCP> by ruiu@tic.UUCP (Dragos Ruiu): +--------------- | I hate to open this can of worms.... | Is there a *portable* way to get two processes to communicate, some | method that has a hope of working under SysV, BSD, HP-UX and the plethora of | weird beasties in Unix land ? Are named pipes the answer ? Are files the last | resort ? | | Barring that is there a method that will work on all SysV (V.2 V.3 ..)? +--------------- Named pipes (FIFOs) work in System III and System V. Under 4.xBSD, you can get the equivalent of a named pipe by getting a socketpair and calling bind() to attach it to a filename. (Think of bind() as flink(), i.e. link a file descriptor into the filesystem; but it only works on sockets, I believe.) This would allow an ALMOST-portable technique, since the only machine depent code is to do a mknod(name, ...|S_IFIFO) under USG or socket() and bind() under BSD. -- Brandon S. Allbery necntc!ncoast!allbery@harvard.harvard.edu {harvard!necntc,well!hoptoad,sun!mandrill!hal,uunet!hnsurg3}!ncoast!allbery Moderator of comp.sources.misc