|Did you know ...||Search Documentation:|
dup2(), copying the underlying filedescriptor and thus making both streams point to the same underlying object. This is normally used together with fork/1 and pipe/2 to talk to an external program that is designed to communicate using standard I/O.
Both FromStream and ToStream either refer to a Prolog stream or
an integer descriptor number to refer directly to OS
descriptors. See also
demo/pipe.pl in the source-distribution of