summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/tip/cmds.c9
-rw-r--r--usr.bin/tip/cu.c6
-rw-r--r--usr.bin/tip/tip.114
-rw-r--r--usr.bin/tip/tip.c6
4 files changed, 16 insertions, 19 deletions
diff --git a/usr.bin/tip/cmds.c b/usr.bin/tip/cmds.c
index 8d7cfeb5132..f875cdbd040 100644
--- a/usr.bin/tip/cmds.c
+++ b/usr.bin/tip/cmds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmds.c,v 1.19 2004/05/26 18:17:58 deraadt Exp $ */
+/* $OpenBSD: cmds.c,v 1.20 2004/11/07 09:48:08 otto Exp $ */
/* $NetBSD: cmds.c,v 1.7 1997/02/11 09:24:03 mrg Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)cmds.c 8.1 (Berkeley) 6/6/93";
#endif
-static const char rcsid[] = "$OpenBSD: cmds.c,v 1.19 2004/05/26 18:17:58 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: cmds.c,v 1.20 2004/11/07 09:48:08 otto Exp $";
#endif /* not lint */
#include "tip.h"
@@ -510,7 +510,7 @@ pipeout(c)
* Fork a program with:
* 0 <-> remote tty in
* 1 <-> remote tty out
- * 2 <-> local tty out
+ * 2 <-> local tty stderr
*/
void
consh(int c)
@@ -543,8 +543,7 @@ consh(int c)
dup2(FD, 0);
dup2(3, 1);
- for (i = 3; i < 20; i++)
- close(i);
+ closefrom(3);
signal(SIGINT, SIG_DFL);
signal(SIGQUIT, SIG_DFL);
execute(buf);
diff --git a/usr.bin/tip/cu.c b/usr.bin/tip/cu.c
index 5a65aa030e5..aa8bd8f314e 100644
--- a/usr.bin/tip/cu.c
+++ b/usr.bin/tip/cu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cu.c,v 1.15 2004/05/26 18:17:59 deraadt Exp $ */
+/* $OpenBSD: cu.c,v 1.16 2004/11/07 09:48:08 otto Exp $ */
/* $NetBSD: cu.c,v 1.5 1997/02/11 09:24:05 mrg Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)cu.c 8.1 (Berkeley) 6/6/93";
#endif
-static const char rcsid[] = "$OpenBSD: cu.c,v 1.15 2004/05/26 18:17:59 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: cu.c,v 1.16 2004/11/07 09:48:08 otto Exp $";
#endif /* not lint */
#include "tip.h"
@@ -135,7 +135,7 @@ cumain(argc, argv)
signal(SIGQUIT, cleanup);
signal(SIGHUP, cleanup);
signal(SIGTERM, cleanup);
- signal(SIGCHLD, SIG_IGN);
+ signal(SIGCHLD, SIG_DFL);
/*
* The "cu" host name is used to define the
diff --git a/usr.bin/tip/tip.1 b/usr.bin/tip/tip.1
index 8a675d673cd..4d86b62e9d7 100644
--- a/usr.bin/tip/tip.1
+++ b/usr.bin/tip/tip.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tip.1,v 1.29 2003/09/20 18:15:32 millert Exp $
+.\" $OpenBSD: tip.1,v 1.30 2004/11/07 09:48:08 otto Exp $
.\" $NetBSD: tip.1,v 1.7 1994/12/08 09:31:05 jtc Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
@@ -228,14 +228,12 @@ system is processed by the shell.
.It Ic \&~C
Fork a child process on the local system to perform special protocols
such as \s-1XMODEM\s+1.
-The child program will be run with the following somewhat unusual
-arrangement of file descriptors:
+The child program will be run with the following arrangement of
+file descriptors:
.Bd -literal -offset indent
-0 <-> local tty in
-1 <-> local tty out
-2 <-> local tty out
-3 <-> remote tty in
-4 <-> remote tty out
+0 <-> remote tty in
+1 <-> remote tty out
+2 <-> local tty stderr
.Ed
.It Ic \&~#
Send a
diff --git a/usr.bin/tip/tip.c b/usr.bin/tip/tip.c
index fbc0af68445..a12c5882fcd 100644
--- a/usr.bin/tip/tip.c
+++ b/usr.bin/tip/tip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tip.c,v 1.23 2004/05/26 18:17:59 deraadt Exp $ */
+/* $OpenBSD: tip.c,v 1.24 2004/11/07 09:48:08 otto Exp $ */
/* $NetBSD: tip.c,v 1.13 1997/04/20 00:03:05 mellon Exp $ */
/*
@@ -40,7 +40,7 @@ static const char copyright[] =
#if 0
static char sccsid[] = "@(#)tip.c 8.1 (Berkeley) 6/6/93";
#endif
-static const char rcsid[] = "$OpenBSD: tip.c,v 1.23 2004/05/26 18:17:59 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: tip.c,v 1.24 2004/11/07 09:48:08 otto Exp $";
#endif /* not lint */
/*
@@ -138,7 +138,7 @@ notnumber:
(void)signal(SIGQUIT, cleanup);
(void)signal(SIGHUP, cleanup);
(void)signal(SIGTERM, cleanup);
- (void)signal(SIGCHLD, SIG_IGN);
+ (void)signal(SIGCHLD, SIG_DFL);
if ((i = hunt(system)) == 0) {
printf("all ports busy\n");