cu/uucp suspend/restart getty - how?

Wm E. Davidsen Jr davidsen at sixhub.UUCP
Sun Jun 10 22:59:08 AEST 1990


In article <272 at sherpa.UUCP> rac at 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).

     Name
	  kill - Sends a signal	to a process or	a group	of processes.

     Syntax
	  #include <signal.h>

	  int kill (pid, sig)
	  int pid, sig;

  The hard part is getting the PID of the getty, and the info you want
can be found in utmp.h (to human read) and either /usr/adm/wtmp or
/etc/wtmp (for program reading at runtime). See man section utmp.

  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.
-- 
bill davidsen - davidsen at sixhub.uucp (uunet!crdgw1!sixhub!davidsen)
    sysop *IX BBS and Public Access UNIX
    moderator of comp.binaries.ibm.pc and 80386 mailing list
"Stupidity, like virtue, is its own reward" -me



More information about the Comp.unix.xenix mailing list