URL: https://linuxfr.org/forums/programmation-c--2/posts/appel-system-execve-dans-fonction-du-noyau Title: appel system execve dans fonction du noyau Authors: gadiri Date: 2004年08月12日T01:00:04+02:00 Tags: Score: 0 salut à tous, je voulais demander s'il est possible d'utiliser un appel system ( comme execve) dans un appel system que je veux ajouter dans un noyau linux . l'appel est du type: #include <linux/linkage.h> #include <linux/kernel.h> #include <linux/types.h> #include <linux/unistd.h> char *chemin[2]; char *arg_list[2]; asmlinkage int sys_mon_appel(int arg1, char* arg2){ char *chemin[0]="PATH=/home/gadiri"; char *chemin[1]=NULL; char *arg_list[0]="./program"; char *arg_list[1]=NULL" /* -- */ _syscall3(int,execve,const char *,filename,const char * ,arg_list,char *const,env); /*macro qui permet d'invoquer l'appel system dans l'espace noyau. execve("./program",arg_list,chemin) ; return(1); } cet appel system est sensé à son invocation executer le programme 'program'. voila mais il n'affiche rien, l'appel system est valide j'ai mis des printk pour voir que le code s'execute. si quelqu'un pouvait m'aider se serait sympa merci