Best practice for variables shared between processes?
daniel at rimspace.net
Tue Sep 21 10:07:07 BST 2010
David Alban <extasia at extasia.org> writes:
That has the same failure mode: you can't rename, or hard-link, across
separate file systems. This bites if you use File::Temp, which uses /tmp, and
your target is somewhere else.
Now, a symbolic link might do it, if you didn't count on the receiver deleting
the temporary file to handle getting it gone, but you probably do.
> if you do need a copy, hard linking would provide, well, not a true
> copy, but something that could play one on tv. and, like a moved file
> (in the same filesystem), it benefits from the "copy" springing into
> existence complete.
> On Mon, Sep 20, 2010 at 4:13 PM, Daniel Pittman <daniel at rimspace.net> wrote:
>> Just make sure it is a move, not a copy, of the file; at least one developer
>> around me has dropped in File::Copy::move when they got a plain rename refused
>> because it crossed devices — so ended up copying the data in anyway.
✣ Daniel Pittman ✉ daniel at rimspace.net ☎ +61 401 155 707
♽ made with 100 percent post-consumer electrons
More information about the london.pm