Sigstack and BSD 4.2

Robert Elz kre at mulga.SUN
Sun Mar 18 18:24:39 AEST 1984


One answer as to why has already appeared on the net.  There are times
when such things (exotic as they may seem) really are essential.

There were no intentional changes to awk in 4.2 - there was a bug fix 
that went wrong.  Bill Shannon has already posted a fix to that bug.

The _filbuf change was a bug fix.  I suspect (but haven't investigated)
that its the same in system V.  My reason for suspecting that, is
that in the Kernighan/Pike unix book they use 'read(2)' in their 'tail -f'
program (sorry I've forgotten what they called that, I know
it most definitely wasn't 'tail -f') - their rationale is that
once you've had EOF from stdio, you will continue to get EOF from
future reads.  That's exactly the way it is in 4.2 - which wasn't
available at the time Kernighan/Pike were writing their book.
(Maybe its 5.2, or even 5.3 that has this fixed at Bell though)

Finally, I don't think that it really needs stating, that no-one
should use any of the new low level stuff in 4.2 unless you really
need to.  Continue doing things the old way, using the library
routines.  Obviously portability is important.  However, its
nice to know, that on the odd occasion when the old way simply
isn't good enough, that there's a new way, there ready for you
to use - you don't have to wait till someone else thinks of it
or start hacking yourself.

Robert Elz



More information about the Comp.unix.wizards mailing list