From owner-freebsd-hackers Thu Mar 6 19:56:16 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id TAA09705 for hackers-outgoing; Thu, 6 Mar 1997 19:56:16 -0800 (PST) Received: from iago.ienet.com (iago.ienet.com [207.78.32.53]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id TAA09700 for ; Thu, 6 Mar 1997 19:56:11 -0800 (PST) Received: from iago.ienet.com (localhost.ienet.com [127.0.0.1]) by iago.ienet.com (8.8.5/8.8.5) with ESMTP id TAA19401 Thu, 6 Mar 1997 19:54:32 -0800 (PST) Message-Id: <199703070354.TAA19401@iago.ienet.com> From: pius@ienet.com To: msmith@atrad.adelaide.edu.au Cc: sos@ravenock.cybercity.dk, hackers@FreeBSD.ORG, mark@quickweb.com Subject: Re: Linux JDK on 2.2 Date: Thu, 06 Mar 1997 19:54:32 -0800 Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Fri, 7 Mar 1997, msmith@atrad.adelaide.edu.au wrote: > F_GETOWN Get the process ID or process group currently receiving SIGIO > and SIGURG signals; process groups are returned as negative > values (arg is ignored). > > F_SETOWN Set the process or process group to receive SIGIO and SIGURG > signals; process groups are specified by supplying arg as neg- > ative, otherwise arg is interpreted as a process ID. Ok, I wasn't quite sure if these were directly related to FIOGETOWN/FIOSETOWN, but now after closer examination of sys_generic.c (ioctl) and kern_descrip.c (fcntl) in /usr/src/sys/kern, it appears to me that fcntl(fd, F_SETOWN, pid) is equivalent to ioctl(fd, FIOSETOWN, &pid) and pid = fcntl(fd, F_GETOWN, 0) is equivalent to ioctl(fd, FIOGETOWN, &pid) Is that correct? If that's the case, then the FIOGETOWN/FIOSETOWN ioctl's could be implemented in linux_ioctl.c similarly to the way the F_GETOWN/F_SETOWN fcntl's are currently implemented in linux_file.c - perhaps linux_fcntl could even be called directly from linux_ioctl in these cases, but maybe that would be considered inefficient. In linux_file.c there's this comment in the linux_fcntl function: case LINUX_F_SETOWN: case LINUX_F_GETOWN: /* * We need to route around the normal fcntl() for these calls, * since it uses TIOC{G,S}PGRP, which is too restrictive for * Linux F_{G,S}ETOWN semantics. For sockets, this problem * does not exist. */ So, how are FreeBSD's F_{G,S}ETOWN semantics different from Linux's? Ok, for sockets they're the same, but for ttys it appears that FreeBSD requires that the tty is the current process's controlling terminal. Is that how FreeBSD's semantics are more restrictive? Regards, Pius