On Wed, May 16, 2012 at 12:09 PM, Raphael Kubo da Costa
<rak...@freebsd.org> wrote:
> Lucas De Marchi <lucas.demar...@profusion.mobi> writes:
>
>> The renaming there is probably a hack so code paths that calls stat()
>> to check if the file exists. If you know it exists, you could rename
>> it to "/" for example or any path in <put-here-your-choice-of-OS> that
>> is guaranteed to exist in the meantime. Reading
>> http://lists.freebsd.org/pipermail/freebsd-hackers/2007-November/022227.html
>> it looks like you have an equivalent in FreeBSD in /dev/fd/.
>
> While that would work in theory, it also requires one to have an fdescfs
> mounted and still isn't very portable.
>
> The renaming is indeed a hack -- what I wonder is if it is worth
> keeping.

As you noticed, any code path that calls stat() to verify if the file
indeed exists would fail. You'd need to investigate the code paths and
refactor them:

- If you receive an fd, stat(filename, ...) should not happen -> and
the filename should be used for logging purposes and similar stuff.

Postponing the removal like you did IMO is a hack to fix another hack.
So, either do  the same thing as in Linux (rename to something will
continue to exist) or change all code paths.


Lucas De Marchi

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to