From: Subrata <sub...@us...> - 2007-08-06 09:36:22
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/write In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv4191/ltp/testcases/kernel/syscalls/write Modified Files: write05.c Log Message: "rsa...@br..." fixed write05 that failed with LTP 20070331 on Fedora 7 GA Index: write05.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/write/write05.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** write05.c 12 May 2006 15:44:11 -0000 1.7 --- write05.c 6 Aug 2007 09:32:49 -0000 1.8 *************** *** 47,50 **** --- 47,52 ---- * -Ported * 04/2002 wjhuie sigset cleanups + * 08/2007 Ricardo Salveti de Araujo <rsa...@li...> + * - Closing the fd before removing the file * * Restrictions *************** *** 72,75 **** --- 74,78 ---- extern int Tst_count; char filename[100]; + int fd; char * bad_addr = 0; *************** *** 82,86 **** char pbuf[BUFSIZ]; int pipefildes[2]; ! int status, pid, fd; /* parse standard options */ --- 85,89 ---- char pbuf[BUFSIZ]; int pipefildes[2]; ! int status, pid; /* parse standard options */ *************** *** 234,237 **** --- 237,243 ---- TEST_CLEANUP; + /* Close the file descriptor befor removing the file */ + close(fd); + unlink(filename); tst_rmdir(); |