[Klone-users] insmod or launching a script on the foxboard

thomas fossati tho at koanlogic.com
Wed Sep 24 07:58:45 EDT 2008


Hi,

On Sep 24, 2008, at 1:39 PM, smlabs wrote:
> In your opinion to launch a bash script is better system or exec or  
> shell_exec?

system(3) is simpler and not less general, in this specific setting  
I'd use that.  If you need some custom environment you may let env(1)  
execute your script with all the needed variables set, e.g.:

     rc = system("env PATH=/usr/sbin:/sbin /mnt/flash/cdBluez-start");

or put the env variables directly into the shell script.

shell_exec is PHP, so I'd avoid that because of the excessive level of  
wrapping: bourne shell which executes PHP which interprets shell_exec  
which in turn exec's cBluez-start :)

ciao, t.




More information about the klone-users mailing list