Re: [PATCH 07/14] register_tempfile(): new function to handle an existing temporary file

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

 



On 06/10/2015 07:55 PM, Junio C Hamano wrote:
> Michael Haggerty <mhagger@xxxxxxxxxxxx> writes:
> 
>> Allow an existing file to be registered with the tempfile-handling
>> infrastructure; in particular, arrange for it to be deleted on program
>> exit.
>>
>> Signed-off-by: Michael Haggerty <mhagger@xxxxxxxxxxxx>
>> ---
> 
> Hmph.  Where does such a tempfile that is not on list come from?

You saw the answer to your question later in the patch series, but for
the benefit of other readers:

This function will be useful to manage the lifetime of a file whose
creation is not as simple as open(); for example, if the file has to
itself be created using the lockfile API, or if it is not a regular file
(e.g., a socket). I will explain this better in the commit message in v2.

> [...] Also I cannot
> tell which one of register_tempfile() and register_tempfile_object()
> I should be calling when updating the implementation of this API
> from their names.

Good point. I will rename the latter to prepare_tempfile_object() and
add a docstring.

Michael

-- 
Michael Haggerty
mhagger@xxxxxxxxxxxx

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]