Re: [PATCH] gitweb: Support caching projects list

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

 



On Fri, Mar 14, 2008 at 11:29 AM, Jakub Narebski <jnareb@xxxxxxxxx> wrote:
>  What should the code for this look like? Like below?
>
>         use File::Temp;
>
>         my ($fh, $temp_file) = tempfile();
>         ...
>         close $fh;
>         rename $temp_file, $cache_file;

I always use something like:

  my $temp_file = "$cache_file.tmp$$";
  open(my $fh, ">$temp_file");

to ensure that the temp file is on the same filesystem.

j.
--
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]

  Powered by Linux