From owner-freebsd-hackers Thu Mar 6 21:54:11 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id VAA16737 for hackers-outgoing; Thu, 6 Mar 1997 21:54:11 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id VAA16731 for ; Thu, 6 Mar 1997 21:54:04 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.3/8.6.9) id QAA02103; Fri, 7 Mar 1997 16:44:34 +1100 Date: Fri, 7 Mar 1997 16:44:34 +1100 From: Bruce Evans Message-Id: <199703070544.QAA02103@godzilla.zeta.org.au> To: msmith@atrad.adelaide.edu.au, pius@ienet.com Subject: Re: Linux JDK on 2.2 Cc: hackers@freebsd.org, mark@quickweb.com, sos@ravenock.cybercity.dk Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >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? FreeBSD's F_{G,S}ETOWN/O_ASYNC implementation is completely broken: - it should apply to open file instances, but actually applies to devices. - normal kill() permissions don't apply. Any process can send SIGIO to any process using a socket. - for ttys, the process group handling is tangled up with POSIX POSIX group handling. The process group can only be set to that of a session leader with the tty as its controlling terminal. It is impossible to set the pgrp to a process instead of a group. - there are some confusing double negatives to convert from negative pids to positive process group numbers and back. ISTR that at least one driver gets this wrong. Bruce