> > Do you remember why you wanted to push a 0-byte write?
Dave Lukes wrote:
> How else can you write tapemarks on a half-inch magtape?


Actually that would require special-case code in the magtape driver,
since a natural 0-length data record (which is shorter than allowed
by the ANSI standard) does not have the same encoding as a genuine
tape-mark record.

The Unix tradition (before special ioctls) was that close would
write two tape marks, and back up one position (between those tape
marks). If one had opened the "non-rewinding" device, it could
then be re-opened and the effect would have been that one tape
mark had been inserted. I've made use of this in a suite of
magtape-handling utilities that I've used for preserving images
of old tape archives.

> Also, "push a 0-byte write" is the wrong way to think about it:
> it's "send a 0-length chunk".


Yes, I agree with that. The only information in a zero-length
data record is its mere existence, which may or may not be
evident, depending on the context in which it occurs. (In the
1999 C standard, empty arguments to functionlike macros are
supported, in the form of "placeholder" tokens that evaporate
after all the dust has settled. Their existence matters while
the macro replacement, pasting, etc. are occurring, but not
afterward.)