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

17 lines
285 B
C

/* binaire : recouvre1 */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
char *envp[3];
int main() {
envp[0] = "X=AAAAA"; envp[1] = "Y=BBB"; envp[2] = NULL;
execl( "recouvrante", "recouvrante", "/tmp/ddd", NULL, envp);
perror("execl");
return EXIT_FAILURE;
}