Path: utzoo!dciem!nrcaer!julie!mcr From: mcr@julie.UUCP (Michael Richardson) Newsgroups: comp.unix.wizards Subject: Re: Can cu do call-backs to terminals? Message-ID: <0532.AA0532@julie> Date: 21 Aug 89 02:49:42 GMT References: <318@galadriel.bt.co.uk> Followup-To: comp.unix.wizards Organization: Sandleman Software Works' Debugging Department, Ottawa, ON Lines: 43 Pete French writes: >Forget cu - it does far more than you need. I had to do this once and the >solution I came up with was to write a C program that called out on a hayes >modem line and when it got a 'CONNECT' message it forked a getty. For this to >work the process must attach stdin, stdout and stderr to the outgoing terminal On SVR3.2 (ICS 2.0.2 I think) I tried something like that. (Only it was for inbound. uugetty is junk, and uucico and cu don't seem to do CLOCAL right. I was sending an init string, waiting for `RING', sending `ATA' and waiting for `CONNECT' --- with a shell script and some timed read functions and stdin and stdout redirected to the tty opened in CLOCAL mode.) I wanted to `exec getty' from the shell script, which did work fine --- except that login wants the password from stderr. Okay, bypass this problem for the moment and enter it in from my test terminal, and then it dies --- the `/etc/utmp' entry points to the wrong pid. The on-site morning session was over and I left it doing inbound only... (Exec'ing the shell script never seemed to work --- the tty's file descriptor which I was dup()ing seemed to get screwed around by exec()..) >line and then set itself to be the head of a process group. If not then /dev/tty >will not point to the right device. I do not have the src available on my >current machine however (and I never quite finished it anyway...) Of course, he has SVR3.2, then he probably also has ct. :-) Has anyone else ever tried building better modem support into getty? I'll probably try again, and bit the bullet and do it in C. (Very difficult to debug programs when their stdin/stdout is not your terminal, and you need another machine, two phones lines, --- if there were two phone lines available, one would be outbound and the problem solved.) >-Pete French. -- :!mcr!: Michael Richardson Amiga v--------+ UUCP: uunet!attcan!lsuc!nrcaer!julie!mcr | INTERNET mcr@doe.carleton.ca Fido: Michael Richardson @ 1:163/109.10<--+ Alter @ 7:483/109.10