exec.c (8af1452cf8dd1b33da881f84e445d5981eaa9613) exec.c (22626efa0f96cbca4edae882e46cb56b1879706b)
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 18 unchanged lines hidden (view full) ---

27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#if defined(LIBC_SCCS) && !defined(lint)
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 18 unchanged lines hidden (view full) ---

27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#if defined(LIBC_SCCS) && !defined(lint)
35#if 0
36static char sccsid[] = "@(#)exec.c 8.1 (Berkeley) 6/4/93";
35static char sccsid[] = "@(#)exec.c 8.1 (Berkeley) 6/4/93";
37#endif
38static const char rcsid[] =
39 "$FreeBSD$";
40#endif /* LIBC_SCCS and not lint */
36#endif /* LIBC_SCCS and not lint */
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD$");
41
42#include "namespace.h"
43#include <sys/param.h>
44#include <sys/types.h>
45#include <sys/stat.h>
46#include <errno.h>
47#include <unistd.h>
48#include <stdlib.h>

--- 145 unchanged lines hidden (view full) ---

194}
195
196int
197execvp(name, argv)
198 const char *name;
199 char * const *argv;
200{
201 char **memp;
39
40#include "namespace.h"
41#include <sys/param.h>
42#include <sys/types.h>
43#include <sys/stat.h>
44#include <errno.h>
45#include <unistd.h>
46#include <stdlib.h>

--- 145 unchanged lines hidden (view full) ---

192}
193
194int
195execvp(name, argv)
196 const char *name;
197 char * const *argv;
198{
199 char **memp;
202 register int cnt, lp, ln;
203 register char *p;
200 int cnt, lp, ln;
201 char *p;
204 int eacces, save_errno;
205 char *bp, *cur, *path, buf[MAXPATHLEN];
206 struct stat sb;
207
208 eacces = 0;
209
210 /* If it's an absolute or relative path name, it's easy. */
211 if (index(name, '/')) {

--- 107 unchanged lines hidden ---
202 int eacces, save_errno;
203 char *bp, *cur, *path, buf[MAXPATHLEN];
204 struct stat sb;
205
206 eacces = 0;
207
208 /* If it's an absolute or relative path name, it's easy. */
209 if (index(name, '/')) {

--- 107 unchanged lines hidden ---