From e60e80fff9a4ea12644dbe41b9e1d49aeb27419a Mon Sep 17 00:00:00 2001 From: mikel Date: Mon, 3 Mar 1997 04:02:21 +0000 Subject: pass $SHELL or /bin/sh as argv[0] to subshell, instead of "sh"; fixes PR bin/3276. --- usr.bin/script/script.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr.bin/script/script.c') diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c index ac9e52f767a..0145ffc6860 100644 --- a/usr.bin/script/script.c +++ b/usr.bin/script/script.c @@ -1,4 +1,4 @@ -/* $NetBSD: script.c,v 1.3 1994/12/21 08:55:43 jtc Exp $ */ +/* $NetBSD: script.c,v 1.4 1997/03/03 04:02:21 mikel Exp $ */ /* * Copyright (c) 1980, 1992, 1993 @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)script.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$NetBSD: script.c,v 1.3 1994/12/21 08:55:43 jtc Exp $"; +static char rcsid[] = "$NetBSD: script.c,v 1.4 1997/03/03 04:02:21 mikel Exp $"; #endif /* not lint */ #include @@ -74,7 +74,7 @@ struct termios tt; __dead void done __P((void)); void dooutput __P((void)); void doshell __P((void)); - void err __P((const char *, ...)); +__dead void err __P((const char *, ...)); void fail __P((void)); void finish __P((int)); void scriptflush __P((int)); @@ -213,7 +213,7 @@ doshell() (void)close(master); (void)fclose(fscript); login_tty(slave); - execl(shell, "sh", "-i", NULL); + execl(shell, shell, "-i", NULL); perror(shell); fail(); } -- cgit