[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Once again: File locking broken under MiNT 1.12h4?



Hello,

(as my first message seems to got lost somehow, I repost it again. Sorry
for the inconvenience!)

Two days ago I updated my MiNT 1.12 from h3 to h4. I noticed that
programs which do file locking don't work correctly anymore. Here's a
small example that reproduces the behaviour on my system:

#include <osbind.h>
#include <mintbind.h>
#include <filesys.h>

int
main (void)
{
	int handle;
	struct flock lock = { 0, 0L, 0L, 0 };
	long err;

	handle = Fopen ("u:\\etc\\passwd", 0);
	err = Fcntl (handle, &lock, F_SETLK);

	printf ("Error: %ld\n", err);

	return (0);
}

Running under h3 the lock will established, and a zero is printed to
indicate the successful operation. But with h4 I get the error code -49
(meaning "no more files"), and no lock is created. Many programs will
quit at this point because they regard this as a fatal error.

My configuration: MSTE 4, TOS 2.05, MiNT 1.12h4 (I used the precompiled
binary to exclude possible compilation errors), MiNTOS 1.4.1, HDDriver
2.71, MinixFS 0.60pl11, MiNTLibs PL 46, GCC 2.6.3.

Can anyone confirm this behaviour? If so, how can I correct it?


       Sascha Blank (inf03@uni-trier.de)
       Trier, den 15. Juni 1995