[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nmh-workers] tempfile creation
From: |
Paul Fox |
Subject: |
[Nmh-workers] tempfile creation |
Date: |
Wed, 27 Apr 2005 09:50:25 -0400 |
it seems that the usual paradigm in the nmh code (i'm looking at 1.1
source) for creating a temp file is to do something like this, from
mhbuild.c:
/* copy standard input to temporary file */
strncpy (infile, m_scratch ("", invo_name), sizeof(infile));
if ((fp = fopen (infile, "w")) == NULL)
adios (infile, "unable to open");
invo_name at this point is "mhbuild". m_scratch() adds some
randomness (via mktemp()), and opens the file.
a) i'm surprised the transition to mkstemp hasn't happened. this
may feed into the reasons behind b), which is that since there's
no path associated with the temp file name, it's created in the
current directory. if i don't happen to have write permission
there, mhbuild fails. why aren't tempfiles created in /tmp?
paul
=---------------------
paul fox, address@hidden (arlington, ma, where it's 48.7 degrees)
- [Nmh-workers] tempfile creation,
Paul Fox <=
- Re: [Nmh-workers] tempfile creation, Mike O'Dell, 2005/04/27
- Re: [Nmh-workers] tempfile creation, Mike O'Dell, 2005/04/27
- Re: [Nmh-workers] tempfile creation, Neil W Rickert, 2005/04/27
- Modernizing core code (was Re: [Nmh-workers] tempfile creation, heymanj, 2005/04/27
- Re: Modernizing core code (was Re: [Nmh-workers] tempfile creation, Ralph Corderoy, 2005/04/28