D
David Mathog
A program of mine writes to a tape unit. Output can be either through
stdout or through a file opened with fopen(). When all the data is
transferred to tape the program needs to close the output stream so that
the tape driver will write a filemark on the tape. Otherwise multiple
clumps of data saved to tape would all appear to be one big file on the
tape.
When the tape unit device was explicitly opened with fopen()
that's possible: call fclose() and then for the next batch
of data fopen() the tape device again and write some more.
However when data is going through stdout like:
program > /dev/nst0
is there an equivalent operation? Maybe something like this:
fputc(stdout,EOF);
or this
freopen(NULL,"wb",stdout);
?
Thanks,
David Mathog
stdout or through a file opened with fopen(). When all the data is
transferred to tape the program needs to close the output stream so that
the tape driver will write a filemark on the tape. Otherwise multiple
clumps of data saved to tape would all appear to be one big file on the
tape.
When the tape unit device was explicitly opened with fopen()
that's possible: call fclose() and then for the next batch
of data fopen() the tape device again and write some more.
However when data is going through stdout like:
program > /dev/nst0
is there an equivalent operation? Maybe something like this:
fputc(stdout,EOF);
or this
freopen(NULL,"wb",stdout);
?
Thanks,
David Mathog