[lkml]   [2001]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: race condition on looking up inodes
In article <000201c0c0a4$eb5c7b10$321ea8c0@saturn> you wrote:
> rename("/usr/hybrid/cfg/data","/usr/mytemp/data1"); /*for process 1*/
> rename("/usr/mytemp/data1","/usr/test");/* for process 2*/

Rename syscall is expected to be atomic on unixoid systems. And I dont know of
a case where a problem is, besides if you use some network file system, where
nobody can realy gurantee anything (well kidding, but it is harder than on a
local one).

The second rename may see the result of the first rename or the original state
before the first rename. It will not see any half-state or locked nodes.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:24    [W:0.030 / U:0.920 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site