X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=2.2 required=5.0 tests=AWL,BAYES_20,RCVD_BAD_ID X-Spam-Check-By: sourceware.org Message-ID: <49C3BF14.5000602@bull.net> Date: Fri, 20 Mar 2009 17:06:44 +0100 From: Martine Carannante User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.6) Gecko/20050319 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: UNLINK problem (again!!) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi I kow that several persons have sent a mail concerning this problem, but=20 unfortunately I don't see a clear solution in the mailing list. It seems to me very strange because this kind of code happens very often . My problem is that we can't recreate a file immediately after an=20 unlink() of this file.I have a permission denied. Here is my test program testop.c. When I execute it : $ ./testop Create file unlink file Create Again the file Error Create: : Permission denied Thanks in advance for your help Best regards Martine ---------------------------------------- testop.c=20 ---------------------------------------------------- #include #include #include main() { FILE *fp=3DNULL; int ret; printf("Create file\n"); if((fp=3Dfopen("toto","a+"))=3D=3DNULL) { perror("Error Create: "); exit(255); } printf("unlink file\n"); ret=3Dunlink("toto"); if (ret !=3D 0) { perror("Error Unlink: "); exit(255); } printf("Create Again the file\n"); if((fp=3Dfopen("toto","a+"))=3D=3DNULL) { perror("Error Create: "); exit(255); } } ---------------------------------------------------------------------------= --------------------- ~ --=20 Martine Carannante System Software Development R&D=20 Bull, Architect of an Open World TM=20 T=E9l : (+33) 1 30 80 71 87 http://www.bull.com=20 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/