Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!ico!vail!dougm From: dougm@ico.ISC.COM (Doug McCallum) Newsgroups: comp.unix.questions Subject: Re: Talk & select Message-ID: <15763@vail.ICO.ISC.COM> Date: 16 May 89 14:36:32 GMT References: <1790@jhunix.HCF.JHU.EDU> Reply-To: dougm@ico.ISC.COM (Doug McCallum,violet,114,) Distribution: usa Organization: Interactive Systems Corp., Boulder CO Lines: 30 In article <1790@jhunix.HCF.JHU.EDU> eed_waek@jhunix (Alexander Kaplan) writes: ... >system is a mix of Unix V 3.1 with BSD 4.3 socket. After ... >1) When I initiate talk in a hardwired tty line, I get a message > error waiting daemon with errno 22 -- invalid argument. >2) When I initiate talk in a ttyq line (i.e. ethernet connection), > I get the same message: error waiting daemon with errno 2 -- > no such file or directory. >3) When I initiate talk in a ttyq line but redirect output to a > file, I get the same message except with another errno 25 -- > not a typewriter. > >When I looked into the program, I found this error was generated >after a call to select. Unless the V.3 vendor added support for select for tty devices, select won't work. V.3 does not have a native select. It does have the "poll" system call which is similar in functionality but only for STREAMS descriptors. Poll returns EINVAL (errno 22) when handed an non-STREAMS file descriptor. It sounds like your select is implemented with a call to poll. Another note about select and applications like talk that would use curses/termcap under V.3. There is a very primitive select emulation that will cause problems. You need to be sure to load your network library before -lcurses. Doug McCallum Interactive Systems Corp dougm@ico.isc.com