static char *sccsid
= "@(#)lock.c 4.2 (Berkeley) %G%";
* Lock a terminal up until the knowledgeable Joe returns.
char masterp
[] = "hasta la vista\n";
char s
[BUFSIZ
], s1
[BUFSIZ
];
* Ignore signals generated from tty keyboard. These signals
* are for xBSD only. This program should be compiled with
* the jobs library (cc ... -ljobs).
sigset( SIGINT
, SIG_IGN
);
sigset( SIGQUIT
, SIG_IGN
);
sigset( SIGTSTP
, SIG_IGN
);
ntty
= tty
; ntty
.sg_flags
&= ~ECHO
;
fgets(s
, sizeof s
, stdin
);
fgets(s1
, sizeof s1
, stdin
);
fgets(s
, sizeof s
, stdin
);
if (strcmp(s
, masterp
) == 0)