summaryrefslogtreecommitdiff
path: root/test/unistd/vfork.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/unistd/vfork.c')
-rw-r--r--test/unistd/vfork.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/unistd/vfork.c b/test/unistd/vfork.c
index 73100e427..dca4464e0 100644
--- a/test/unistd/vfork.c
+++ b/test/unistd/vfork.c
@@ -30,10 +30,14 @@ int main(void)
{
pid_t pid;
int status, wpid;
+ char *argv[] = {
+ "/bin/ls",
+ NULL,
+ };
if ((pid = vfork()) == 0) {
printf("Hi. I'm the child process...\n");
- execvp("/bin/ls",NULL);
+ execvp(argv[0], argv);
_exit(0);
}