www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/07/29/05:59:46

Date: Thu, 29 Jul 93 11:45:09 +0200
From: kuku AT acds DOT physik DOT rwth-aachen DOT de (Christoph Kukulies)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Novell problems

Now finally after managing to trace turboassist calls easily in
i_21() - in the first place I was always trying to trace it
on the libc side in turbo.s (which is in protected mode) but
it really was much easier to compile a special go32.exe
with the appropriate printfs in the right places - 
I can come up with a boiled down example of what is going wrong
with open/creat and fstat under Novell. Look at the following example:

#include <fcntl.h>
#include <sys/stat.h>
main(argc,argv)
int argc;
char **argv;
{
	int i,j;
	struct stat buf;
	if(argc!=2)
		printf(" pass filename\n"),exit(1);
        j=open(argv[1],O_RDONLY,0666);
	i=creat(argv[1],0666);
	close(i);
	if(j > 0)
		printf("fstat returns: %d\n",fstat(j,&buf));
}

When invoked with a local file name the file is created on the first invocation.
Invoking it a second time will yield a return value of 0 from the
fstat while when doing the same sequence with a file argument located on
a network drive fstat will fail when the file is there.

I wonder what is different with Novell that the code behaves so differently.

--Chris

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019