jmon Well-Known Member Licensed User Longtime User Nov 1, 2016 #1 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 (&) Click to expand... 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
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 (&) Click to expand... 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
Erel B4X founder Staff member Licensed User Longtime User Nov 1, 2016 #2 You don't need it. The program will run in a different process and will not block your program. Upvote 0
jmon Well-Known Member Licensed User Longtime User Nov 1, 2016 #3 Thank you, so it will run indefinitely if I set the timeout to -1 right? Even if I quit my b4j app? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Nov 1, 2016 #4 jmon said: so it will run indefinitely if I set the timeout to -1 right? Click to expand... Yes. jmon said: Even if I quit my b4j app? Click to expand... Not sure about this one. You will need to test it. Upvote 0
jmon said: so it will run indefinitely if I set the timeout to -1 right? Click to expand... Yes. jmon said: Even if I quit my b4j app? Click to expand... Not sure about this one. You will need to test it.