| Line | |
|---|
| 1 | /* execl() - execute Author: Kees J. Bot
|
|---|
| 2 | * 21 Jan 1994
|
|---|
| 3 | */
|
|---|
| 4 | #define execl _execl
|
|---|
| 5 | #define execve _execve
|
|---|
| 6 | #include <unistd.h>
|
|---|
| 7 |
|
|---|
| 8 | extern char * const **_penviron; /* The default environment. */
|
|---|
| 9 |
|
|---|
| 10 | int execl(const char *path, const char *arg1, ...)
|
|---|
| 11 | /* execl("/bin/sh", "sh", "-c", "example", (char *) 0); */
|
|---|
| 12 | {
|
|---|
| 13 | /* Assumption: The C-implementation for this machine pushes
|
|---|
| 14 | * function arguments downwards on the stack making a perfect
|
|---|
| 15 | * argument array. Luckily this is almost always so.
|
|---|
| 16 | */
|
|---|
| 17 | return execve(path, (char * const *) &arg1, *_penviron);
|
|---|
| 18 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.