X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Thorsten Kampe Subject: Re: Unable to delete directory in Cygwin Date: Thu, 15 Jun 2006 16:28:32 +0100 Lines: 35 Message-ID: <143umqixuj7aa$.q6uf55wgjg5t$.dlg@40tude.net> References: <1F211FE03383644EAA6BB7A52FCD9B9B0927A0 AT sohm DOT kpit DOT com> <1F211FE03383644EAA6BB7A52FCD9B9B0927A4 AT sohm DOT kpit DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit User-Agent: 40tude_Dialog/2.0.15.1pl X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 * Gina Verlekar (2006-06-15 10:53 +0000) > I have implemented some changes in the linker code for some intermediate > processing. > For that I need to create a temporary directory, generate some > intermediate > files in it, process those files by calling a function. After processing > of the > intermediate files, I delete the intermediate files and the temporary > directory. > While this logic works fine in the linux, the temporary directory does > not get > deleted in cygwin. > [...] > After debugging using gdb, I found that in cygwin, the intermediate > files still > had some handlers open for it inspite of reaching till the end of the > main() > function in linker. Due to this, the temporary files get deleted only > after > exiting from the main. Hence as the temporary drectory is not empty till > then, > it cannot get deleted. > > This behaviour is not seen in linux. Care has been taken in the code for > correct > opening and closing of the intermediate files. > > Is this a known behavior in cygwin? Any inputs will be appreciated. mkdir test && cd test && rmdir ../test does work in Linux but not under Windows and therefor not under Cygwin. Cygwin can't break Windows rules. Under Linux you can name a file c:, under Windows and under Cygwin not. -- 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/