2 Proprietary Rand Corporation
, 1981.
3 Further distribution of
this software
4 subject to the terms of the Rand
9 #include "../h/errors.h"
10 #define NSHARGS 25 /* limit on number of args to shell command file */
15 register char **v1
, **v2
;
20 if (*v1
++ == -1) *--v1
= 0;
22 /* return 0 if not found, -1 if not executable */
23 if (errno
== ENOENT
|| errno
== EACCES
)
25 else if (errno
!= ENOEXEC
)
31 while (*v1
++ = *v2
++) {
32 if (v1
>= &shvec
[NSHARGS
]) {
37 execv(args
[0], shvec
);
41 execlsh(name
,arg0
,arg1
,arg2
)
42 char *name
, *arg0
, *arg1
, *arg2
;
44 return(execvsh(name
,&arg0
));