sending signals to child process

S

Sarir Khamsi

I would like to start a child process (like w/ popen3(), or some such)
and then be able to interrupt it by sending it a control-c. How do I
do that in Python? Is there a better way to gracefully halt a child
process? Is there a more cross-platform way to start a child process
(popen() is only on UNIX/Win32)? Thanks.

Sarir
 
D

Diez B. Roggisch

Sarir said:
I would like to start a child process (like w/ popen3(), or some such)
and then be able to interrupt it by sending it a control-c. How do I
do that in Python? Is there a better way to gracefully halt a child

Use os.kill and the signal module.
process? Is there a more cross-platform way to start a child process
(popen() is only on UNIX/Win32)? Thanks.

In python2.4 there is the subprocess module.
 
S

Sarir Khamsi

Diez B. Roggisch said:
Use os.kill and the signal module.


In python2.4 there is the subprocess module.

This is what I was looking for...thanks.

Sarir
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top