Path: utzoo!attcan!uunet!pdn!palan!sherpa!rac From: rac@sherpa.UUCP (Roger Cornelius) Newsgroups: comp.unix.xenix Subject: Re: cu/uucp suspend/restart getty - how? Message-ID: <275@sherpa.UUCP> Date: 11 Jun 90 01:10:32 GMT References: <1137@sixhub.UUCP> Organization: Personal System Computing, St. Petersburg, FL Lines: 27 From article <1137@sixhub.UUCP>, by davidsen@sixhub.UUCP (Wm E. Davidsen Jr): | In article <272@sherpa.UUCP> rac@sherpa.UUCP (Roger Cornelius) writes: | | | | Can someone enlighten me as to how uucp and cu signal getty to suspend | | and restart with SCO's HDB uucp? I recall discussion here about | | manually using SIGUSR1 and SIGUSR2 to accomplish this, but I'd like to | | understand how cu/uucp do it (ie., from within a C program). | | Logic: | - Scan utmp for a getty. | - Get the line # from the entry. | - Send SIGUSR1 to the getty using kill(). | - Use the line. | - Send SIGUSR2 to the getty. But the getty process is owned by root and cu/uucp are suid uucp. How can they kill the process (with kill())? Either I'm missing something or the above isn't correct (at least for cu/uucp - I agree it should work for a process running as root). So how can a process owned by uucp suspend/restart the getty? -- Roger A. Cornelius rac@sherpa.UUCP uunet!sherpa!rac