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

16 lines
286 B
C

/* binaire : recouvre2 */
#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;
execle( "recouvrante", "recouvrante", "/tmp/ddd", NULL, envp);
perror("execle");
return EXIT_FAILURE;
}