• [^] # Re: Impossible

    Posté par . En réponse au message Communication entre processus avec pipe() et dup2().. Évalué à 1.

    Source :

    argv[0] = "-li";
    argv[1] = NULL;
    execve("/bin/bash",argv,NULL);

    Résultat :

    toto@ThinkPad:~/lab$ ./main 
    ls
    Makefile
    main
    main.c
    main.o
    tmp_log
    toto
    toto.c
    toto.o
    ls
    Makefile
    main
    main.c
    main.o
    tmp_log
    toto
    toto.c
    toto.o