From: markgo <gol...@gm...> - 2007-07-05 07:26:21
|
Hi, In some script I'm sending the command that runs some tool that could only be stopped by pressing Ctrl-C. It does not wait for any input. Is there any way to simulate this Ctrl-C (that is SIGINT) except closing the session? Currently it looks like that: $session = new Expect; $session->spawn("su - $user_name") or die "..."; # Script runs as root $session->expect(....); ... $session->send("sudo $tool"); ... This is a tool I'd like to interrupt. $session->send("\cC") does not work, I suppose because the tool is not waiting for input. Thank you, Mark -- View this message in context: http://www.nabble.com/Is-it-possible-to-interrupt-spawned-session-%28like-Ctrl-C%29-tf4028111.html#a11441982 Sent from the Perl - Expectperl-Discuss mailing list archive at Nabble.com. |