[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Execlp

Hi again,

Here's the part of the code

   if(execlp("ifconfig","", netdev,"up",NULL)<0){
            printf("execlp error %s(%d)\n", strerror(errno), errno);

 > Have you included <unistd.h> ?
No, it is not included directly, but via some other files
Compiling for the i386 host it works as expected. Is it compulsory to 
include directly for cris-etrax?

> If so, can you provide some more details about how it fails?
There is absolutely no error message, it just doesn't execute the command
At least there is no effect that I can see
In my example above, it adds a network device and "ups" it. Doing an ifconfig manually after
reveals that no network device was added... 

 > What kernel version are you using?


Eric Chapman

Lehrstuhl für Nachrichtentechnik
Universität des Saarlandes
Postfach 15 11 50
D-66041 Saarbrücken
Tel: +49 681 302 3975
Fax: +49 681 302 3972
Web: www.lnt.uni-saarland.de