var pid = fork() if (pid == 0) { var args = ["/bin/ls"] execv ("/bin/ls", args) exit(1) } var status = 0 waitpid (pid, status)