From owner-freebsd-hackers Tue Aug 8 19:45:14 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id TAA05032 for hackers-outgoing; Tue, 8 Aug 1995 19:45:14 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id TAA04967 ; Tue, 8 Aug 1995 19:44:36 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id MAA01237; Wed, 9 Aug 1995 12:39:43 +1000 Date: Wed, 9 Aug 1995 12:39:43 +1000 From: Bruce Evans Message-Id: <199508090239.MAA01237@godzilla.zeta.org.au> To: davidg@Root.COM, gclarkii@freefall.cdrom.com Subject: Re: FoxPro II.1 Cc: freebsd-hackers@freefall.cdrom.com Sender: hackers-owner@FreeBSD.org Precedence: bulk >>How does the following look? >> >>CALL open(0x40524f,0,0) >>NAMI "/dev/null": >>RET open 4 >>CALL fcntl(0x4,0x6,0xefbfbf34) >>RET fcntl -1 errno 99 Unknown error: 99 >>CALL close (0x4) >>RET close 0 >> >>Then it goes on to load error messages and then it exits. > The above fcntl() is highly bogus. I suspect that the main problem is that >the process group/PID (third argument to fcntl) wasn't specified, or a pointer >to it was specified rather than the actual value (i.e. it wasn't dereferenced). >...but why you would want to do an F_SETOWN on /dev/null is also a little >strange. I think 99 is a translation of errno 45 (EOPNOTSUPP). See /sys/i386/ibcs2/ ibcs2_sysent.c#bsd_to_sysv_errno[NERR] (this table is apparently out of date - NERR is 80 but FreeBSD-current has 82 errnos). This is consistent with a valid process group/PID. F_SETOWN on /dev/null is just not supported. F_SETOWN is only supported for sockets and ttys and doesn't work right for ttys (it clashes with POSIX controlling terminal semantics). Bruce