We encounter a problem and need your help. In short I have a daemon program AAA that is launched when ARM embedded device is booting.
Once it's started, AAA program needs to call another program BBB when an even xxx occurred ( we use execl("/bin/sh", "sh", "-c", BBB_command, (char*) 0); )
This BBB program works perfectly when we launched AAA manually (login by telnet and type /usr/local/bin/AAA & ). But if AAA is launched during booting time (Daemon service ), BBB is not launched (child -1 returned)
If we use AAA in x86 env, it works fine in all scenarios.
Please sorry for this dummy explanation as I'm not developer. If you don't clearly understand, or need further info, i can give you the code in PMB.
Thanks
this is possibly due to tha fact that when u launch the service AA ta boot time, then till the time all OS services required to run AA are not fully initialized.
If ur code runs fine when run manually then there seems to be no issue due to any code defect.
Are both users same when u run manually and when AAA is launched at boot time.
Are u running the AAA manually using root....?
if not then try using root.
if there is code issue then it should also fail when run using root user.
Pls get back to me.
U can share code with me.