diff options
author | Ulrich Drepper <drepper@redhat.com> | 2006-08-01 06:40:11 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2006-08-01 06:40:11 +0000 |
commit | a1260d92a7e3c11e1db74ad7007332f87fc1b690 (patch) | |
tree | 0690bdd3500e1dcc2b72ad8cd35b2a69de74dc79 /stdlib | |
parent | 13669f2c304545de194ec014255b5e3141615ac1 (diff) | |
download | glibc-a1260d92a7e3c11e1db74ad7007332f87fc1b690.zip glibc-a1260d92a7e3c11e1db74ad7007332f87fc1b690.tar.gz glibc-a1260d92a7e3c11e1db74ad7007332f87fc1b690.tar.bz2 |
* stdlib/test-canon.c (do_test): Close fd before unlinking file so
that directory is empty even on non-POSIX filesystems.
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/test-canon.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/stdlib/test-canon.c b/stdlib/test-canon.c index 5426746..9261898 100644 --- a/stdlib/test-canon.c +++ b/stdlib/test-canon.c @@ -1,5 +1,6 @@ /* Test program for returning the canonical absolute name of a given file. - Copyright (C) 1996,1997,2000,2002,2004,2005 Free Software Foundation, Inc. + Copyright (C) 1996,1997,2000,2002,2004,2005,2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger <davidm@azstarnet.com>. @@ -213,7 +214,10 @@ do_test (int argc, char ** argv) } if (fd >= 0) - unlink ("doesExist/someFile"); + { + close (fd); + unlink ("doesExist/someFile"); + } if (has_dir) rmdir ("doesExist"); |