bill@ssbn.WLK.COM (Bill Kennedy) (05/13/88)
A couple of days ago I posted a m'aidez about how to respawn a process in Xenix 386 Vr2.2.3, SCO was not going to be able to help me until today. I wasn't very happy about that, I was less happy when they called today and said it would be tomorrow. Read "less happy" any way you want... What I need to do is have a modem answer the phone, dialog some with a credit authorization terminal and then disconnect. The application has nothing to do with credit authorization, but it's what we're using for data collection. In the two days from when I asked SCO how to do it and today I found a myriad of bad techniques, wandering zombies, unkillable processes, file systems busy at shutdown, I shall not repeat any of them here but I will pass on the technique that SCO gave me on the phone, today. I have intentionally forgotten the analysts name and he doesn't know how grateful he is for that :-) The manual page for gettydefs(F) mentions a login program following the next-label. The explanation isn't obvious to me, so I'll just explain what he coached me through and it works! 1) Make a new gettydefs entry, call it `p', make the flags what you need, mine needed ISTRIP and PARENB as well as baud rate changes. Finish the new gettydefs line with "# p # AUTO /etc/login" (quotes are mine). 2) Make a new user name in /etc/passwd for the tty port names you want to use this way, in my case, ttym06 and ttym07. SCO suggested that I make the log in shell be /bin/sh, but that had a number of bad side effects for me, not the least of which was making motd and /etc/profile speeches to a device that was expecting a naked '\005', so I made the default shell be my application program, /usr/lib/clubs/omron. 3) Set up /etc/ttys to the devices you want, 0pttym06 and 0pttym07 in my case. 4) Enable the ports and you're on your way! Mine raises DTR to the modem port, waits for DCD, logs in the user with the tty device as "controlling terminal" (so that SIGHUP works...) and executes the application program which kills the getty when it closes the file and a brand new getty is activated promptly. I can't, with a clear conscience, rag SCO for taking so long to get back to me because, by definition, I couldn't do anything until I got this to work anyway. Perhaps this article will help someone with the same but less urgent problem. I doubt that you would enjoy screaming as loud as I did to get to the right person, I didn't. Besides, it's the finished result that counts and we have it. -- Bill Kennedy usenet {rutgers,ihnp4!killer,cbosgd}!ssbn!bill internet bill@ssbn.WLK.COM