[Gambas-user] Control-C and a Process
Benoit Minisini
gambas at ...1...
Sun Feb 4 10:57:08 CET 2007
On Sunday 04 February 2007 10:26, timothy wrote:
> Hello,
>
> Is there a way of sending a Control-C to a process. I have declared the
> process something like this:
>
> PRIVATE MyProcess as Process
>
> ...
>
> MyProcess = SHELL "MyCommand" FOR READ WRITE
>
> When it comes to quiting the process early the man page for the command
> I am using recommends using a Control-C. I have tried things like:
>
> Print #MyProcess, Chr(3)
>
> and a few other variations, but these do not appear to work. In fact no
> control codes appear to be usable. If all else fails I can Kill the
> process. But this seems overkill - bad pun intended :-)
>
> Any ideas?
>
> By the way I have just found the Quote.Shell method. I like this.
>
> Thanks
>
> 8-{)} Timothy Marshal-Nichols
> <mailto: timothy.marshal-nichols at ...247...>
>
CTRL+C in a shell has nothing to do with characters sent to the process input.
It is related to job control and the terminal emulation done by Linux.
There is no support for that at the moment.
CTRL+C send the SIGINT signal to the process, whereas Process.Kill() sends the
SIGKILL signal.
Regards,
--
Benoit Minisini
More information about the User
mailing list