[illumos-Developer] Pls review 269
Alexander Eremin
alexander.r.eremin at gmail.com
Thu Oct 7 03:15:01 PDT 2010
Hi, Garrett.
> My concerns are:
> a) does this create a possible race condition. I.e. was the old code
> using a single name to prevent two instances of these commands from
> running at the same time? (In this new code, the "last one" would win.)
> If a lock is needed, perhaps using a "well known name" for the new file
> name, opened O_EXCL | O_CREAT, would be sufficient. (Along with a
> warning if the temp file still exists.)
> b) the other possible issue I see here is permission based. With a
> rename, do you inherit the old permissions? (I don't think we want that
> behvior...) I can't recall the semantics of rename when an existing
> file exists. Please check to make sure that if the old file has
> permissions that differ from the new file, that we get the new
> permissions. (I think it probably does, since the file permissions are
> part of the underlying file and not part of the directory entry, but I'd
> still like confirmation via a simple test.)
> Otherwise it looks good.
> Thanks.
> - Garrett
I've updated webrev with recommended changes:
http://cr.illumos.org/view/levmpevp/
I've got a right permissions after tests.
--
Thanks,
Alex
More information about the Developer
mailing list