lkml.org 
[lkml]   [1998]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Anybody out there? (ETXTBSY)
H. Peter Anvin <hpa@transmeta.com> wrote:
> You can't rename() onto a file that exists.

Huh?

I'm going to be pedantic here:

$ cp /bin/sleep /tmp/old
$ cp /bin/date /tmp/new
$ ls -l /tmp/{old,new}
-rwxr-xr-x 1 rdm rdm 23196 Aug 28 18:28 /tmp/new
-rwxr-xr-x 1 rdm rdm 4760 Aug 28 18:27 /tmp/old
$ /tmp/old 100 &
[1] 30957
$ strace -o /tmp/trace mv /tmp/new /tmp/old
$ ls -l /tmp/{old,new}
ls: /tmp/new: No such file or directory
-rwxr-xr-x 1 rdm rdm 23196 Aug 28 18:28 /tmp/old
$ jobs
[1]+ Running /tmp/old 100 &
$ lists$ grep rename /tmp/trace
rename("/tmp/new", "/tmp/old") = 0
$
--
Raul

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

\
 
 \ /
  Last update: 2005-03-22 13:44    [from the cache]
©2003-2011 Jasper Spaans