Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: ji@cs.columbia.edu (John Ioannidis) Newsgroups: comp.sys.sun Subject: close() returns bogus errno for xy0* under 4.0.1EXPORT Keywords: SunOS Message-ID: <8903082132.AA05654@cs.columbia.edu> Date: 16 Mar 89 01:30:16 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 31 Approved: Sun-Spots@rice.edu Original-Date: Wed, 8 Mar 89 16:32:00 EST X-Sun-Spots-Digest: Volume 7, Issue 201, message 14 of 15 What's wrong with the following program fragment? fd = open("/dev/xy0g", 2); /* fd gets set to 3 */ ... if (close(fd) < 0) perror("closing"); Nothing, one would say. But on a 3/280, with a Xylogics 451 and a NEC drive hanging off of it, that close() returns -1 and errno is set to 1 (EPERM, "Not owner"). This doesn't happen if I open the corresponding character-special file, and it doesn't happen for a SCSI drive (shoeboxes connected to 3/60s) and it doesn't happen under 3.4. Furthermore, examining the kernel structures reveals that the file has been correctly closed, fd's, file and vnode tables, the works, have been correctly updated, and just somehow somewhere the carry bit is being set. A quick (<1 day) inspection of the sources revealed nothing. Has anybody else experienced this? Is it a known bug? adTHANKSvance, /ji #include In-Real-Life: John Ioannidis E-Mail-To: (preferred), or P-Mail-To: GIP-Altair, Dom de Voluceau BP105, Rocquencourt 78153 Le Chesnay, FR V-Mail-To: +33 1 39635227, +33 1 39635417 [[ Someone reported a similar problem in a device driver that he wrote. See v7n153. --wnl ]]