lkml.org 
[lkml]   [2001]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: race condition on looking up inodes
Date
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.

Greetings
Bernd
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  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