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

Re: metamail: wishlist bug



Michael Moerz <aon.912411198@aon.at> writes:

> The problem is that metamail makes use of mkstemp and it leaves
> tmp files behind
> [...]
> 1) I could add each tmp file to a list and clean it up before the
>    program leaves. (that would not require to touch even a single
>    line of code, but I would have to add some lines that do that)
> 2) I could change the mkstemp code to use tmpfile(), but then I
>    would have to change much more of the original code and it 
>    would be much more likely to introduce new bugs.

3) Call unlink(2) or remove(3) on each file returned by mkstemp.
   This assumes that metamail doesn't need to reference the file
   by name lateron again.

HTH,
        -- forcer

-- 
Jorgen Schaefer
Debian GNU/Linux Developer
forcer@debian.org



Reply to: