Hi David,

> > > With auto and suffix, n is one beyond the existing file with the
> > > highest number in the same form.
> > 
> > I think it's more that n is the first number from 1 that isn't
> > already used?  So with foo.{1,2,3,9} it's foo.4.
>
> You're right.  As you might expect, the code just just iterates up
> from 1 until stat(2) finds the first opening.

Strictly speaking, I wonder if it should be attempting to open(2) each
contender with O_CREAT | O_EXCL until one succeeds, at which point it
has the file descriptor to use.  Unlikely to be an issue with
interactive use but perhaps with some procmail-type handling?

Cheers, Ralph.

_______________________________________________
Nmh-workers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to