[Tutor] Threads and Signals
Andrew Heagle
andrew at logaan.com
Tue Dec 20 18:55:15 CET 2011
Hi,
I am testing out some stuff with threads and signals. This is just a prototype
of how I want to incorporate it into my main script.
I figured out how to "catch" signals for SIGUSR1 to output what all the thread
children are "working" on. The problem I have is if in terminalA I run my
script, and in terminalB I do `kill -SIGUSR1 $pid` the output from the script
shows up on terminalA. How can I get the output to show up in terminalB? The
reason I ask is because the script will be running in a loop forever doing
something, so I would like to be able to "query it".
I attached my test script in case that helps, so feel free to critique my code
at the same time, if you like as I just starting learning Python recently.
Thanks,
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: killtest.py
Type: text/x-python
Size: 2314 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/tutor/attachments/20111220/bf84bcc0/attachment.py>
More information about the Tutor
mailing list