Hi !
thanks to Jack and Roman this bash script successfully restarts pd:
#!/bin/bash sudo puredata /path/to/patch.pd & PID1=$!
while true do if [ ! -d /proc/$PID1 ] then sudo puredata /path/to/patch.pd & PID1=$! fi sleep 1 done
what i don’t yet get is: what happens if pd is still running but hanging in limbo, frozen in the watchdog loop. i mean sometimes pd is still running but does not output sound or react to input… is there a solution to kill and restart pd in such a case?
Thanks ! Michael
Hi,
Hi !
thanks to Jack and Roman this bash script successfully restarts pd:
#!/bin/bash sudo puredata /path/to/patch.pd & PID1=$!
while true do if [ ! -d /proc/$PID1 ] then sudo puredata /path/to/patch.pd & PID1=$! fi sleep 1 done
what i don’t yet get is: what happens if pd is still running but hanging in limbo, frozen in the watchdog loop. i mean sometimes pd is still running but does not output sound or react to input… is there a solution to kill and restart pd in such a case?
Please excuse the obvious answer, but it would be best to first find out why Pd would hang and solve the problem at its source. Other hacks/workaround cound include: -Depending on what your installation is about it could be possible to restart Pd or your computer every day. A simple timerswitch would suffice. -Have Pd send a (heartbeat) message to another program via FUDI or OSC. When this message is not received it could indicate that Pd hangs and that other program could kill PID1 and restart.
By the way: Is there a reason you run Pd as root?
cheers, P
hi! i run pd on raspberry pi, with some sensors connected, and control from an app via OSC there are many things that can go wrong, pd actually just does audio playback of 4channel files. this thing is running as an installation in a museum, so far quite stable, since the last week there was one ocasion where the raspberry or pd crash. i actually have no idea how to find out what why this happens (have to find out where to find crash - reports…)
maybe it would be a good thing to automatically shutdown the raspi at 18h everyday.
thanks for the tips! mkl
Please excuse the obvious answer, but it would be best to first find out why Pd would hang and solve the problem at its source. Other hacks/workaround cound include: -Depending on what your installation is about it could be possible to restart Pd or your computer every day. A simple timerswitch would suffice. -Have Pd send a (heartbeat) message to another program via FUDI or OSC. When this message is not received it could indicate that Pd hangs and that other program could kill PID1 and restart.
By the way: Is there a reason you run Pd as root?
cheers, P