Blocking ctrl-c to os.popen() or os.system()
torppa at staff.megabaud.fi
Sun Jan 5 05:54:10 CET 2003
In article <qwOR9.108503$6H6.3599736 at twister.austin.rr.com>, Sandeep Gupta wrote:
> I am running on Linux, but the script I'm writing will also be using on
> What I meant was I start the command and programatically wait for it to
> finish. I wait for the command to finish by doing an f.read() on the stdout
> returned from popen*(). While I am waiting for it to finish, if the user
> types ctrl-c, the command receives the interrupt.
> But if my command is "cvs diff", cvs receives the ctrl-c.
> Any other suggestions?
If your cvs is doing remote stuff it's most propably ssh/rsh that is
trying to grab terminal directly, ssh has some flags that
This might also help, unless it also enables tty signal processing
at=at & ~TERMIOS.ISIG
This most propably does not work on windows
More information about the Python-list