Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!mips!apple!voder!wlbr!WLV.IMSD.CONTEL.COM!sms From: sms@WLV.IMSD.CONTEL.COM (Steven M. Schultz) Newsgroups: comp.unix.wizards Subject: Re: fcntl/socket anomaly Keywords: obscure behavior Message-ID: <43648@wlbr.IMSD.CONTEL.COM> Date: 8 Jan 90 09:11:26 GMT References: <10763@encore.Encore.COM> <129970@sun.Eng.Sun.COM> Sender: news@wlbr.IMSD.CONTEL.COM Reply-To: sms@WLV.IMSD.CONTEL.COM.UUCP (Steven M. Schultz) Organization: Contel Federal Systems Lines: 30 In article <129970@sun.Eng.Sun.COM> lm@sun.UUCP (Larry McVoy) writes: >In article <10763@encore.Encore.COM> peralta@encore.com (Rick Peralta) writes: >> >>Why when setting the F_SETOWN on a socket a pfind is not done on the PID? >>Maybe more to the point, why the double standard on how a pgrp is specified? > >F_SETOWN has been a botch from day one as far as I'm concerned. For amen. >those who don't know (or don't remember) F_SETOWN is used to say "send >this pid the SIGIO when the time is right"... >Furthermore, the F_SETOWN uses the same field in the tty >structure that the tty sub system uses for job control... >My guess is that the SIGIO interface was a hack that some grad student >needed. They hacked it in, it works in the obvious cases, it's stuck >around... The hack/botch is the F_SETOWN, or rather the whole fcntl(2) syscall. As i recall fcntl(2) was (needlessly?) instituted by the creators of System V(anilla) and adopted by Berkeley as a compatability measure, nothing that really couldn't be done by ioctl(2) but a new syscall was created anyhow. and don't forget the overlaying (reuse) of the VTIME and VEOT members of the AT&G Unix tty system - switch modes from to/from 'cbreak' and you have surprises too. but then, i suppose it was done by a graduate student... .5;-) Steven