Messages in this thread | | | Date | Mon, 8 Jun 2015 11:53:03 -0300 | From | Arnaldo Carvalho de Melo <> | Subject | Re: [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
| |