fcntl/socket anomaly

Steven M. Schultz sms at WLV.IMSD.CONTEL.COM
Mon Jan 8 20:11:26 AEST 1990


In article <129970 at sun.Eng.Sun.COM> lm at sun.UUCP (Larry McVoy) writes:
>In article <10763 at encore.Encore.COM> peralta at 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



More information about the Comp.unix.wizards mailing list