From 8656368e5c75ef30c04c97a543f86377b719b0d4 Mon Sep 17 00:00:00 2001 From: ache Date: Fri, 7 Jul 1995 22:45:26 +0000 Subject: Produce importpath warning only for true interactive shells, close PR 598 --- bin/csh/csh.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bin/csh') diff --git a/bin/csh/csh.c b/bin/csh/csh.c index f6a24e3..d43fb61 100644 --- a/bin/csh/csh.c +++ b/bin/csh/csh.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: csh.c,v 1.2 1994/09/24 02:53:51 davidg Exp $ + * $Id: csh.c,v 1.3 1995/05/30 00:06:30 rgrimes Exp $ */ #ifndef lint @@ -618,7 +618,8 @@ importpath(cp) for (;;) { if ((c = *dp) == ':' || c == 0) { *dp = 0; - if ((*cp != '/' || *cp == '\0') && (euid == 0 || uid == 0)) + if ((*cp != '/' || *cp == '\0') && (euid == 0 || uid == 0) && + (intact || intty && isatty(SHOUT))) (void) fprintf(csherr, "Warning: imported path contains relative components\n"); pv[i++] = Strsave(*cp ? cp : STRdot); -- cgit v1.1