summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorniklas <niklas@openbsd.org>1996-03-03 12:33:51 +0000
committerniklas <niklas@openbsd.org>1996-03-03 12:33:51 +0000
commit5ee6c6c36a6a20056eb51fbf25bee608af544d3d (patch)
treeb0a3b478f64afb4a502461d9903ac1979bc3df25
parentFrom NetBSD: (diff)
downloadwireguard-openbsd-5ee6c6c36a6a20056eb51fbf25bee608af544d3d.tar.xz
wireguard-openbsd-5ee6c6c36a6a20056eb51fbf25bee608af544d3d.zip
From NetBSD:
Changed so that INTOFF/INTON are paired in getpwd(). From Matthias Pfaller <leo@marco.de>. Fixes PR #2130.
-rw-r--r--bin/sh/cd.c7
-rw-r--r--bin/sh/shell.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/bin/sh/cd.c b/bin/sh/cd.c
index 1a275d78949..08a08bbf34e 100644
--- a/bin/sh/cd.c
+++ b/bin/sh/cd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cd.c,v 1.14 1995/11/19 23:27:37 christos Exp $ */
+/* $NetBSD: cd.c,v 1.15 1996/03/01 01:58:58 jtc Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)cd.c 8.2 (Berkeley) 5/4/95";
#else
-static char rcsid[] = "$NetBSD: cd.c,v 1.14 1995/11/19 23:27:37 christos Exp $";
+static char rcsid[] = "$NetBSD: cd.c,v 1.15 1996/03/01 01:58:58 jtc Exp $";
#endif
#endif /* not lint */
@@ -259,6 +259,7 @@ getpwd()
#if defined(__NetBSD__) || defined(__svr4__)
if (getcwd(buf, sizeof(buf)) == NULL)
error("getcwd() failed");
+ curdir = savestr(buf);
#else
{
char *p;
@@ -298,7 +299,7 @@ getpwd()
error("pwd command failed");
p[-1] = '\0';
}
-#endif
curdir = savestr(buf);
INTON;
+#endif
}
diff --git a/bin/sh/shell.h b/bin/sh/shell.h
index 2cd6bf862d5..5419e330c1d 100644
--- a/bin/sh/shell.h
+++ b/bin/sh/shell.h
@@ -1,4 +1,4 @@
-/* $NetBSD: shell.h,v 1.8 1995/05/11 21:30:22 christos Exp $ */
+/* $NetBSD: shell.h,v 1.9 1996/03/01 01:59:00 jtc Exp $ */
/*-
* Copyright (c) 1991, 1993