user or P4 or both.
?- open('/dev/ttyp4', read, P4),
wait_for_input([user, P4], Inputs, 0).
|
This predicate relies on the select() call on most operating systems.
On Unix this call is implemented for any stream referring to a
file-handle, which implies all OS-based streams: sockets, terminals,
pipes, etc. On non-Unix systems select() is generally only implemented
for socket-based streams. See also library(socket) from the clib
package.
on (default) and off.
First Old is unified with the current value. Then the new
value is set to New. (27)
With the introduction of exception-handling, it is adviced to use
catch/3
to catch possibly file-errors and act accordingly. Note that if fileerrors
is off, no exception is generated.