Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Aug 1995 12:39:43 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        davidg@Root.COM, gclarkii@freefall.cdrom.com
Cc:        freebsd-hackers@freefall.cdrom.com
Subject:   Re: FoxPro II.1
Message-ID:  <199508090239.MAA01237@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>>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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508090239.MAA01237>