_ RU.UNIX.BSD (2:5077/15.22) _____________________________________ RU.UNIX.BSD _
From : Alex Zakirov 2:5029/5 03 Sep 99 09:26:56
Subj : порты и ppp chat
________________________________________________________________________________
Serg Ivanov <Serg.Ivanov@p113.f3.n5073.z2.fidonet.org> wrote:
SI> Hiya, Igor!
SI> At 01 Sep 99 10:37:43, Igor Sysoev wrote to All:
IS>> Святым духом, что ли ?
IS>> Чат прекрасно работает без оператора.
SI> Он прекрасно это делает из-под ppp. Как ему объяснить где модем ?
SI> Собственно надо в 8 утра говорить S0=8, в 17:00 S0=1 ;)
while ( waitpid(pid, &status, 0) < 0 ) {
if ( errno == EINTR )
continue;
errx(1,"error waiting for scripting process");
}
unlock(1);
return(status == 0 ? 0: -1);
}
void
usage()
{
printf("usage: %s [options] <progname>n"
" -m - reset CLOCALn"
" -r - set CRTSCTSn"
" -n - don't lock devicen"
" -s <speed> - serial port baud rate [57600]n"
" -l <tty> - tty [/dev/ttyd1]n"
" -c <file> - run '/usr/bin/chat -Sf <file>' instead prognamen"
" -v - run '-c' mode with '-vsf' optionsn"
" progname - run this program with stdin/stdout on ttyn",
myname);
exit(1);
}
/*
* set_up_tty: Set up the serial port on `fd' for 8 bits, no parity,
* at the requested speed, etc. If `local' is true, set CLOCAL
* regardless of whether the modem option was specified.
*
* For *BSD, we assume that speed_t values numerically equal bits/second.
*/
void
set_up_tty(fd, local)
int fd, local;
{
struct termios tios;
if (tcgetattr(fd, &tios) < 0) {
errx(1,"tcgetattr: %s",strerror(errno));
}
if (!restore_term) {
inittermios = tios;
ioctl(fd, TIOCGWINSZ, &wsinfo);
}
*** WBR, Alex Zakirov (frank@pptus.ru, ICQ:38685959, 2:5029/5)
...UNIX _is_ user friendly. It's just selective about who it's friends are.
(c) Marco Molteni
--- tin/pre-1.4-19990517 ("Psychonaut") (UNIX) (FreeBSD/3.1-19990324-STABLE
(i386))
* Origin: RSI Station (2:5029/5@fidonet)