C bug in SCO Unix/ODT 1.0?

Clay Jackson cjackso at uswnvg.UUCP
Fri May 17 01:51:20 AEST 1991


I think I've discovered a problem with SCO's ODT Development System Version
1.0 - to wit:


#include <sys/types.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
char filename[]="foo";
main()
{
int fd;
int mode = 00400;
int o_mode = O_WRONLY|O_CREAT|O_TRUNC;

fd = open(filename, o_mode, mode);

printf("fd=%d\no_mode=%d\nmode=%d\nerrno=%d\n",fd,o_mode,mode,errno);
}

The obove code fails, returning an error code of ENOENT, which, in the
SCO Man pages, is not a documented error for that particular flavor of
open.  However:


#include <sys/types.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
char filename[]="foo";
main()
{
int fd;
int mode = 00400;

fd = creat(filename, mode);

printf("fd=%d\nmode=%d\nerrno=%d\n",fd,o_mode,mode,errno);
}

This code works just fine.

Any comments?

TIA!

Clay Jackson
N7QNM
US West NewVector Group

uunet!uswnvg!cjackso | clayj at cjsysv.wa.com

-- 
Clay Jackson - N7QNM
US WEST NewVector Group, Inc
clayj at cjsysv.wa.com | ...uunet!uswnvg!cjackso



More information about the Comp.unix.xenix.sco mailing list