*/
#ifndef lint
-static char *sccsid = "@(#)sh.exec.c 5.4 (Berkeley) 5/19/88";
+static char *sccsid = "@(#)sh.exec.c 5.7 (Berkeley) 5/27/90";
#endif
#include "sh.h"
#include <sys/dir.h>
+#include <string.h>
+#include "pathnames.h"
/*
* C shell
{
register struct varent *v;
register char **vp;
- extern char *sys_errlist[];
char *lastsh[2];
execv(f, t);
*/
v = adrof1("shell", &aliases);
if (v == 0) {
-#ifdef OTHERSH
register int ff = open(f, 0);
char ch;
-#endif
vp = lastsh;
- vp[0] = adrof("shell") ? value("shell") : SHELLPATH;
+ vp[0] = adrof("shell") ? value("shell") : _PATH_CSHELL;
vp[1] = (char *) NULL;
-#ifdef OTHERSH
if (ff != -1 && read(ff, &ch, 1) == 1 && ch != '#')
- vp[0] = OTHERSH;
+ vp[0] = _PATH_BSHELL;
(void) close(ff);
-#endif
} else
vp = v->vec;
t[0] = f;
default:
if (exerr == 0) {
- exerr = sys_errlist[errno];
+ exerr = strerror(errno);
expath = savestr(f);
}
}