BRU has several I/O streams that it uses for providing information to the operator and for accepting input when such input is required. The names of the streams used internally are:
This is the stream to which all error and warning messages are written, when such messages are NOT part of a query to the user to which a response is required. For example, failure to open a particular file for archiving because of permissions would generate an error message to the stderr stream.
This is the stream to which all information generated as a result of the -v option is written. Also, output as a result of the -h option is written to logfp. If the user specifies a -Il option to BRU, then logfp is opened using that file name. Otherwise, logfp is connected to stdout, unless the archive is being written to stdout, in which case logfp is switched to stderr.
This is the stream to which all messages are written that are part of a query to the user for input, to which a reply is required before execution continues. Execution is blocked until a reply is received (see ttyin). When BRU is run in the foreground, ttyout is connected to the user’s terminal by explicitly opening the file specified by the -Iq option to BRU. If there is no -Iq option specified, then /dev/tty is tried. If this open fails, then ttyout is connected to stderr.
This is the stream from which replies are read in response to queries posted to the ttyout stream. Execution is blocked until the reply is read from the ttyin stream. When BRU is run in the foreground, ttyin is connected to the user’s terminal by explicitly opening the file specified by the -Ir option to BRU. If there is no -Ir option specified, then /dev/tty is tried. If this open fails, then ttyin is connected to stderr.