Why UNIX doesn't support event?

Chris Torek chris at mimsy.UUCP
Mon Feb 13 20:38:14 AEST 1989


In article <1565 at anasaz.UUCP> john at anasaz.UUCP (John Moore) writes:
>... How does one write a SINGLE process that
>will wait for a character to appear on two different tty devices?

Use select(), of course.  (Oh, stuck with SysV?  Too bad :-) :-( )

>How about waiting for a semaphore at the same time?

To a tune from _The_Wall_:

	We don't need no semaphores
	We don't need asynchrony
	No dark transactions in the system
	Hey!  Kernel!  Leave those disks alone!

(4BSD does not have semaphores.)

But it is true that most things are done synchronously.  Also *simply*:
which is what Unix is about.  It was never intended to be a transaction
processing system.  If we had events and the like, we would *need* a
fancy sleep mechanism like the one in the kernel.  And it would be ugly.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.wizards mailing list