#include <unistd.h>
int32_t execv(const char *pathname, char *argv[]);
Execute program at pathname
replacing the currently running process. argv
is a NULL terminated array of program parameters, argv[0]
contains the programs name by convention.
Note: The open file descriptors stay the same.
Returns:
-1
on error (e.g. file to execute not found)- won't return on success
Implemented in sys_process.c
as sys_execv()
.
Overview: syscalls
Process Control Syscalls: fork | execv | exit | kill | ms_sleep | wait | chdir | sbrk