Hi David,
Would it make sense to toss it all and use mmap()? Conceptually, it
doesn't seem like a difficult problem to parse header fields and maybe
a body and just hand back a pair of pointers and the state indication.
I'd be -1. It doesn't seem like it's worth deviating from the file I/O
model for any performance gain mmap(2) may give on the platforms that
support it. On the downside, it'll be less familiar to some and POSIX
leaves what happens if the file changes and then a new or deleted bit is
accessed as `unspecified' IIRC. mmap seems fine if the program is
accessing files under its sole control, perhaps not such a good fit for
nmh. At least with file I/O we wouldn't suffer signals.
Cheers, Ralph.
_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers