SCCS-vsn: usr.bin/tip/Makefile 5.10
SCCS-vsn: usr.bin/tip/cmds.c 5.17
-# @(#)Makefile 5.9 (Berkeley) %G%
+# @(#)Makefile 5.10 (Berkeley) %G%
#
# Files are:
# /etc/remote remote host description file
#
# Files are:
# /etc/remote remote host description file
# writes on local side
# BUFSIZ buffer sizing from stdio, must be fed
# explicitly to remcap.c if not 1024
# writes on local side
# BUFSIZ buffer sizing from stdio, must be fed
# explicitly to remcap.c if not 1024
+# CONNECT enable ~C command (connect pgm to remote)
PROG= tip
CFLAGS+=-I${.CURDIR} -DV831 -DVENTEL -DHAYES -DCOURIER -DDEFBR=1200 \
PROG= tip
CFLAGS+=-I${.CURDIR} -DV831 -DVENTEL -DHAYES -DCOURIER -DDEFBR=1200 \
- -DDEFFS=BUFSIZ -DACULOG -DPRISTINE
+ -DDEFFS=BUFSIZ -DACULOG -DPRISTINE -DCONNECT
.PATH: ${.CURDIR}/aculib
BINOWN= uucp
BINGRP= dialer
.PATH: ${.CURDIR}/aculib
BINOWN= uucp
BINGRP= dialer
-static char sccsid[] = "@(#)cmds.c 5.16 (Berkeley) %G%";
+static char sccsid[] = "@(#)cmds.c 5.17 (Berkeley) %G%";
#endif /* not lint */
#include "tip.h"
#endif /* not lint */
#include "tip.h"
#ifdef CONNECT
/*
* Fork a program with:
#ifdef CONNECT
/*
* Fork a program with:
- * 0 <-> local tty in
- * 1 <-> local tty out
+ * 0 <-> remote tty in
+ * 1 <-> remote tty out
- * 3 <-> remote tty in
- * 4 <-> remote tty out
- dup2(FD, 3);
- dup2(3, 4);
- for (i = 5; i < 20; i++)
+ dup2(FD, 0);
+ dup2(3, 1);
+ for (i = 3; i < 20; i++)
close(i);
signal(SIGINT, SIG_DFL);
signal(SIGQUIT, SIG_DFL);
close(i);
signal(SIGINT, SIG_DFL);
signal(SIGQUIT, SIG_DFL);