nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Truncated Email.


From: Robert Elz
Subject: Re: [Nmh-workers] Truncated Email.
Date: Mon, 07 Mar 2016 16:32:31 +0700

    Date:        Sun, 06 Mar 2016 21:28:01 -0500
    From:        Ken Hornstein <address@hidden>
    Message-ID:  <address@hidden>

  | Alright, stepping back from the gigantic mess that is fcntl() and looking
  | at the core problem .... can anyone think of a reason that creat() was used
  | in preference to ftruncate() way back when?

Yes.  Creat() has always existed (it is sys call number 6 or something like
that - one of the very first).  The O_CREAT and O_TRUNC flags (and 3 arg
open()) did not come until 7th edition.   truncate() is even more recent
(perhaps 4.4 bsd ?  I don't think it was in 4.2, not sure about 4.3.)

MH is 6th edition vintage code, and even though nmh is newer and could have
used the O_ flags, and I think is from after [f]truncate was invented, but
perhaps before it was on anything much more than the BSD systems).

  | I see it was that way in mh-6.8.5, but that also used ftruncate()
  | in another file so it's not like that interface hasn't existed forever.

It hasn't, but MH was still getting fixes and improvements more recently
(obviously).  The creat() in inc would have been there from the beginning.

creat() about 1973.  O_CREAT about 1978/9, truncate() probably mid-late 80's.
(Mike O'Dell will probably remember better, probably others here.)

kre




reply via email to

[Prev in Thread] Current Thread [Next in Thread]