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 Date: Sun, 8 Feb 2004 02:49:43 +0100 (CET) From: "W.J. van der Laan" X-X-Sender: orion AT argon DOT local DOT net To: cygwin AT cygwin DOT com Subject: 'errno' bug in cygwin+samba Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-AtHome-MailScanner-Information: Neem contact op met support AT home DOT nl voor meer informatie X-AtHome-MailScanner: Found to be clean 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/