Did you know ... Search Documentation:
streaminfo.pl
PublicShow source
Source stream_info(+Stream) is det
Print detailed information about a stream or a file-number to the error output. The output of this command is meant for experts and requires knowledge about the implementation of streams. It has been added to diagnose leaking streams in web-servers. For example, on linux systems we can examine process file-descriptors using
% ls -l /proc/<pid>/fd

If now (say) descriptor 15 is open where it should not be, we can this command to find the associated Prolog streams and print as mush as possible information about the stream.

?- stream_info(15).
Arguments:
Stream- A stream-handle, alias name, (integer) system file handle or '<stream>(address)' atom.