Using x86 platform , I want to start my application named myapp through this method:execl("./myapp","");It's OK! But failed when I'm using ARM platform + embedded linux. Why ? Any help will be appreciated. Thanks in advance.
Your invocation is wrong: execl()'s argument list MUST be terminated with NULL.
The fact that it works at all on x86 is a miracle ;)
If you would like to use execle to pass in the same environment that your calling application had, you can use this:
#include <unistd.h>
extern char **environ;
/* ... */
execle("./myApp","./myApp",NULL,environ);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With