J
Jordan Abel
fflush(stdout) before mixing stdio and low-level2006-10-26 said:When the linux st driver receives a close operation following a write it
(the st driver) writes the filemark. The fclose() and fflush() don't
write that mark themselves. Apparently the only way to write multiple
files to tape through stdout, and to place a filemark between them,
is to use ioctl(). Even that is tricky, as doing something like:
fwrite(buffer1,BUFSIZE,1,stdout);
ioctl( <appropriate parameters> );
fwrite(buffer2,BUFSIZE,1,stdout);
might result in the filemarks being written before all of the buffer1
data gets to the tape drive.
solved above.