nmh-workers
[Top][All Lists]
Advanced

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

Re: [Nmh-workers] new command lacks lock


From: Ken Hornstein
Subject: Re: [Nmh-workers] new command lacks lock
Date: Sun, 13 Oct 2013 01:07:30 -0400

>I just found that uip/new.c:get_msgnums() isn't locking the sequence file.
>I've attached a patch for 1.5 but noted that you've reworked the locking on
>the master branch so I thought you might appreciate the heads up.

Thanks!  "new" doesn't call the normal set of functions, so I missed it
completely.  Although this leads me to bigger questions ...

Specifically, I see that "new" duplicates a fair amount of the sequence
code.  Anyone know why?  It seems like it could be made a lot simpler
by calling folder_read() and seq_list().

The big difference here is that folder_read() does a complete readdir()
on the folder directory and then reads in the sequence file.  "new"
just directly reads the sequence file.  But ... if you use "new" in the
default mode, it ends up calling crawl_folders(), which at a minimum
does a readdir() on every folder, so that seems to me to be a wash.
I am strongly tempted to rewrite new/fnext/fprev/unseen (they're all
the same program) to use the normal APIs.  Can anyone think of a reason
to not do this?

--Ken



reply via email to

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