Re: Anybody out there? (ETXTBSY)

Raul Miller (rdm@test.legislate.com)
Fri, 28 Aug 1998 22:33:35 -0400


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