ASR31-valarche-2021/Exemples/04-Exec/recouvrement_ls.c
2021-09-29 11:31:40 +02:00

14 lines
210 B
C

#include <stdio.h>
#include <unistd.h>
#define NMAX 5
main() {
char *argv[NMAX]; /* NMAX > 3 */
argv[0] = "ls"; argv[1] = "-l"; argv[2]="/"; argv[3]=NULL;
execv("/bin/ls", argv);
perror("execv");
}