summaryrefslogtreecommitdiff
path: root/bin/ed/main.c
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2013-01-15 20:26:29 +0000
committerMarc Espie <espie@cvs.openbsd.org>2013-01-15 20:26:29 +0000
commit760647b537eb303ec4cb125a2c3ea74620c0aa98 (patch)
tree1818720eceeef446712416c8f035e05ac5c1ab9a /bin/ed/main.c
parent0467cba7ec296e26cb04d5febfb07ebcf31d2f9a (diff)
tidy
okay miod@
Diffstat (limited to 'bin/ed/main.c')
-rw-r--r--bin/ed/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/ed/main.c b/bin/ed/main.c
index 92943b53cae..b9ca1856395 100644
--- a/bin/ed/main.c
+++ b/bin/ed/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.34 2010/08/12 02:00:28 kevlo Exp $ */
+/* $OpenBSD: main.c,v 1.35 2013/01/15 20:26:28 espie Exp $ */
/* $NetBSD: main.c,v 1.3 1995/03/21 09:04:44 cgd Exp $ */
/* main.c: This file contains the main control and user-interface routines
@@ -160,9 +160,10 @@ top:
/* assert: reliable signals! */
#ifdef SIGWINCH
- handle_winch(SIGWINCH);
- if (isatty(0))
+ if (isatty(STDIN_FILENO)) {
+ handle_winch(SIGWINCH);
signal(SIGWINCH, handle_winch);
+ }
#endif
signal(SIGHUP, signal_hup);
signal(SIGQUIT, SIG_IGN);