[comp.unix.wizards] Handling multiple asynchronous reads under Ultrix

davids@iscuva.UUCP (David Schmidt) (05/13/87)

Under Ultrix 1.2 (BSD 4.2), what is the best way to set up
multiple, concurrent read requests?  I would like to set up
a routine that can respond to either a keyboard character or
a network character without having to poll both reads (which
would burn up a LOT of cpu time).

I would also like to avoid using multiple processes (like old
versions of CU did).  I know this can be done as both TIP and
CU under Ultrix only use one process.

I've read the man entries for fcntl(2) and sigvec(2) but I am
unsure of how to set up the reads.  If it makes any difference
one of the reads will be on a socket.

Any code samples would be greatly appreciated!

	Thank-you,
-- 
David Schmidt              UUCP:  davids@iscuva.ISCS.COM
ISC Systems Corporation           (tektronix!reed!iscuva!davids)
East 22425 Appleway        Phone: (509)927-5479
Liberty Lake, WA  99019

davids@iscuva.UUCP (David Schmidt) (05/14/87)

Thank you for all the responces to my posting.  I got to work this
morning to find 2 solutions followed by 3 more solutions that came in
about 10:00 AM!

All solutions mentioned the select(2) call which I was unaware of.

	Thanks again!
-- 
David Schmidt              UUCP:  davids@iscuva.ISCS.COM
ISC Systems Corporation           (tektronix!reed!iscuva!davids)
East 22425 Appleway        Phone: (509)927-5479
Liberty Lake, WA  99019