adrive has asked for the wisdom of the Perl Monks concerning the following question:
hi, I have a scenario that I find it weird and might need to solve it by sending a ctrl+c through open3 function.
my perl script is run from windows, which will call plink (a command based putty to connect to Linux) to run Linux commands. All is fine if the process for Linux finishes and then gets back to windows.
now, my scenario is that while it is processing in plink, someone tries to do a control+c to break the running perl script abruptly.
it ends up windows command prompt has no processes running, but the Linux server connected from plink still thinks the process is not terminated. So I was wondering if I can detect a control+c is happening while perl script is running , then send the contrl+c command to open3's to plink before I terminate.
hi, is there anywhere I can send a ctrl+c to open3 before I exit my script?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: send ctrl+c to open3?
by AppleFritter (Vicar) on Jul 18, 2014 at 09:36 UTC | |
|
Re: send ctrl+c to open3?
by zentara (Cardinal) on Jul 18, 2014 at 09:12 UTC | |
|
Re: send ctrl+c to open3?
by David92 (Sexton) on Jul 18, 2014 at 08:56 UTC |