[Newbies] PipeableOSProcess - Can't SIGINT

Sean P. DeNigris sean at clipperadams.com
Mon Apr 30 05:23:14 UTC 2018


I have the following:

p := PipeableOSProcess command: 'export
PYTHONPATH=$PYTHONPATH:/usr/local/lib/python3.6/site-packages;
/usr/local/bin/python3 /path/to/gst-mic.py'.

The program doesn't stop until it's "told" to, which from a command line
means CTRL-C. However, `p processProxy sigint` [1] doesn't work. I assume
because I don't have the actual python process, but rather the shell
process. This guess is based on seeing that `p processProxy programName =
'/bin/sh'` and arguments are `"#('-c' 'export
PYTHONPATH=$PYTHONPATH:/usr/local/lib/python3.6/site-packages;
/usr/local/bin/python3
/Users/sean/Dynabook/Repositories/seandenigris/DynaChef/asr/experiments/continuous/gst-mic.py')"`. 

Also, if I `ps aux | grep gst-mi` on the command line, I see two processes,
and I can effectively send SIGINT to the python process via `kill -SIGINT
pid`.

Taking a step back, what's the best/easiest/cleanest way for OSP and this
little gobject-loop-based Python program to negotiate when it should stop?

Thanks!



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Squeak-Beginners-f107673.html


More information about the Beginners mailing list