lkml.org 
[lkml]   [2015]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] perf tools: avoid possible race condition in copyfile
Em Mon, Jun 08, 2015 at 04:50:16PM +0200, Milos Vyletel escreveu:
> Use unique temporary files when copying to buildid dir to prevent races
> in case multiple instances are trying to copy same file. This is done by
>
> - creating template in form <path>/.<filename>.XXXXXX where the suffix is
> used by mkstemp() to create unique file
> - change file mode
> - copy content
> - if successful link temp file to target file
> - unlink temp file

Thanks, applied, will be in my next pull request to Ingo,

- Arnaldo


\
 
 \ /
  Last update: 2015-06-08 17:21    [W:0.043 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site