B4J Question [RASPBERRY PI] Running non blocking commands

jmon

Well-Known Member
Licensed User
Longtime User
Hello,

With jshell, on raspberryPi, if I run a command like this:
B4X:
dim sh as Shell
sh.initialize("", "raspistill", Array("-s", "-o", "test%04d.jpg", "&"))

I get an error:
Invalid command line option (&)

The "&" is there to order the command to be non-blocking and to run in the background.

Typing this in putty works:
B4X:
raspistill -s -o test%04d.jpg &

I tried this and didn't work either:
B4X:
dim sh as Shell
sh.initialize("", "sudo", Array("raspistill", "-s", "-o", "test%04d.jpg", "&"))

How to add the "&" sign at the end of the command?

Thank you for your help
Jmon
 
Top