🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #742

Re: Pipes in Quintus

#742
From: Shinji Kono
Date: Sat, 29 Aug 1992 01:16
17 lines
1135 bytes
In article <17ljnjINNlbo@swan.doc.ic.ac.uk> , 
	jvp@doc.ic.ac.uk (Jeremy Pitt) writes 
>Does anybody either (a) know of an easy way of doing both or (b) have
>a library package which exports predicates to do this.

If you are using Sun, named pipe is an easy way to do it.
     mknod p fifo
     quintus
     ?- unix(system('ls -l >>fifo &')).
     ?- see(fifo),repeat,get0(X),put(X),X = -1,seen.
Or it is not so difficult to write fork/exec system call interface.

You need some trick to get stderr/stdout separately in csh. (But I forget
it :-)
---
Shinji Kono @           kono@csl.sony.co.jp
Sony Computer Science Laboratory, Inc,Japan
Technical Details
Message-ID: <1992Aug29.011608.28340@nntp.csl.sony.co.jp>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!sh.wide!wnoc-tyo-news!scslwide!socslgw!daemon
References: <17ljnjINNlbo@swan.doc.ic.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!sh.wide!wnoc-tyo-news!scslwide!socslgw!daemon
From: kono@csl.sony.co.jp (Shinji Kono)
Newsgroups: comp.lang.prolog
Subject: Re: Pipes in Quintus
Message-ID: <1992Aug29.011608.28340@nntp.csl.sony.co.jp>
Date: 29 Aug 92 01:16:08 GMT
References: <17ljnjINNlbo@swan.doc.ic.ac.uk>
Sender: daemon@nntp.csl.sony.co.jp (The devil himself)
Reply-To: kono@csl.sony.co.jp
Organization: Sony Computer Science Laboratory, Inc.
Lines: 17