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 To: cygwin AT cygwin DOT com From: Rolf Campbell Subject: Re: 'errno' bug in cygwin+samba Date: Sun, 08 Feb 2004 18:13:18 -0500 Lines: 76 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT sea DOT gmane DOT org X-Gmane-NNTP-Posting-Host: cpe0006254406f3-cm014260033562.cpe.net.cable.rogers.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 In-Reply-To: First of all, learn to include the correct headers, and to write valid C-code. Here's what you meant to type. #include #include #include #include #include int main() { if(mkdir("test", 0777) < 0) perror("mkdir1"); if(mkdir("test", 0777) < 0) perror("mkdir2"); return 0; } 2nd of all, I get: mkdir2: File exists 3rd of all: http://cygwin.com/problems.html W.J. van der Laan wrote: > Hello, > > Today I stumbled on a really strange bug in Cygwin and Samba: errno 2 is > returned when attempting to create a file or directory that already > exists. > > #include > #include > void main() { > if(mkdir("test", 0777) < 0) > perror("mkdir1"); > if(mkdir("test", 0777) < 0) > perror("mkdir2"); > } > > Gives a "mkdir2: No such file or directory." huh? > > This happens on more occasions; execute this on a mounted samba filesystem > under windows, like /cygdrive/p/... > > >>>>import shelve >>>>shelve.open("test", flag='c') >>>>shelve.open("test", flag='c') > > Traceback (most recent call last): > File "./test.py", line 3, in ? > shelve.open("test", flag='c'); > File "/usr/lib/python2.3/shelve.py", line 231, in open > return DbfilenameShelf(filename, flag, protocol, writeback, binary) > File "/usr/lib/python2.3/shelve.py", line 212, in __init__ > Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback, > binary) > File "/usr/lib/python2.3/anydbm.py", line 83, in open > return mod.open(file, flag, mode) > File "/usr/lib/python2.3/dbhash.py", line 16, in open > return bsddb.hashopen(file, flag, mode) > File "/tmp/python.2664/usr/lib/python2.3/bsddb/__init__.py", line 192, > in hashopen > bsddb._db.DBNoSuchFileError: (2, 'No such file or directory') > Exception exceptions.AttributeError: "DbfilenameShelf instance has no > attribute 'writeback'" in ignored > > It gives an 'No such file or directory' the second time, while the shelve > is succesfully created. It seems to produce this error when a file already > exists. > This essentially makes shelve useless under cygwin. > > Greetings, > Wladimir > -- 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/