cjackso@uswnvg.UUCP (Clay Jackson) (05/16/91)
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@cjsysv.wa.com -- Clay Jackson - N7QNM US WEST NewVector Group, Inc clayj@cjsysv.wa.com | ...uunet!uswnvg!cjackso