Xref: utzoo comp.unix.sysv386:8124 comp.unix.xenix.sco:2545 comp.lang.c:39320 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!uswnvg!cjackso From: cjackso@uswnvg.UUCP (Clay Jackson) Newsgroups: comp.unix.sysv386,comp.unix.xenix.sco,comp.lang.c Subject: C bug in SCO Unix/ODT 1.0? Keywords: C open creat IO/O Message-ID: <814@uswnvg.UUCP> Date: 16 May 91 15:51:20 GMT Followup-To: comp.unix.sysv386 Organization: US West NewVector, Bellevue, Wash. Lines: 56 I think I've discovered a problem with SCO's ODT Development System Version 1.0 - to wit: #include #include #include #include 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 #include #include #include 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