nmh-workers
[Top][All Lists]
Advanced

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

Re: flist -- "Killed" -- oom (*not* 1.8 related)


From: Ken Hornstein
Subject: Re: flist -- "Killed" -- oom (*not* 1.8 related)
Date: Thu, 02 Mar 2023 07:34:01 -0500

>it seems that at some point i had done a search for 74600607886815 (your
>basic "magic number" :).  mh-e, i guess, had created a directory with
>that number as its name (it uses the search term to name subfolders
>under the normal mhe-index folder).  and, i guess, flist decided that
>(under the ~/Mail/MHE-INDEX folder) was a message number?
>
>does that make sense?  i guess mh-e could not create such subfolders
>with names consisting only of decimal integers (i have some
>hexadecimal-named folders which don't seem to give a problem).  or, i
>could not search for such.  or, maybe flist (or, nmh in general?) could
>not think that a directory was a message?

The loop in folder_read() that is scanning for messages is this:

    while ((dp = readdir (dd))) {
        if ((msgnum = m_atoi (dp->d_name)) && msgnum > 0) {
[...]

So if the directory entry is a positive decimal integer, nmh (and MH
before it) considers it a message.  Robert already explained the issues
involved; stat()ing every file to determine if it was a file or not
would be prohibitively slow (and this would affect every nmh program;
almost everything calls folder_read()), and using d_type isn't portable.

I think we have to push this back on the MH-E people; Robert's
suggestion to add a non-numeric prefix to directories it creats sounds
like the best answer to me.

--Ken



reply via email to

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