[so] parametrii execv

Maria Nadejde mnadejde at yahoo.com
Wed Oct 31 22:38:04 EET 2007


Am si eu o intrebare:

de ce nu merge execv cand ii dau urmatorii parametrii:

char *args[3];
args[0]="mkdir";
	args[1]="hipo";
	args[2]=NULL;
fork() case 0:
execve_rv=execv(args[0],args);

dar merge:
execlp_rv=execlp(args[0],args[0],args[1],NULL);

nu merge nici cu:
char *argumente[100];
argumente[nr_argumente]=(char*)word_crt->string;
nr_argumente++;
word_crt=word_crt->next_word;
fork()
case0:
     execve_rv=execv(argumente[0],argumente);
nici cu:
char **manevra;
for(i=0;i<=r_argumente;i++)
	{
		manevra[i]=(char*)malloc(20);
		manevra[i]=argumente[i];
	
		}
fork()
case0:
execve_rv=execvp(manevra[0],manevra);

dar la toate merge cu execlp..deci nu citeste
argumentele din args sau argumente sau manevra:(?

What am i doing wrong:(((?

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the so mailing list