I am trying to reboot the yun from within a python sketch running on the linux side. I can successfully reboot from the linux prompt by simply typing "reboot", but neither this code:
command = "reboot"
import subprocess
process = subprocess.Popen(command.split(), stdout=subprocess.PIPE)
root@Arduino:/mnt/sda1# /sbin/reboot --help
BusyBox v1.19.4 (2014-09-03 19:18:17 CEST) multi-call binary.
Usage: reboot [-d DELAY] [-n] [-f]
Reboot the system
-d SEC Delay interval
-n Do not sync
-f Force (don't go through init)
ok that works as a stand alone sketch, but if I put the code in a function and call it in python, nothing happens. In other words if I run this program:
"multiprocessing" is the module for multiprocessing. but you need compile it yourself since it does not come with YunOS. multiprocessing comes with python-full which pre-installed at Yun.