qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Qemu-devel] Patch Send Ctrl-C to stdio target.


From: Krumme, Chris
Subject: RE: [Qemu-devel] Patch Send Ctrl-C to stdio target.
Date: Tue, 12 Aug 2008 08:31:43 -0700

Hello Anthony,

You were quite right, the ckmakeraw function was the direction to go.

It turns out that the utility of that function had already been hard
coded in vl.c, with one twist.  The ISIG attribute was controlled by the
-nographic option.

In my use I had written a script that backdoored -nographic by setting
the various outputs to use stdio instead of VGA, but I had not used the
-nographic option. This meant I had all of the functionality of
-nographic except the ISIG attribute (and a banner message :-).  This
lead me to want to get rid of the SIGINT.

So now I have to ask: what is the connection between ISIG for Control-C
handling and using the monitor, serial port, or parallel port on stdio.
If any one of these uses stdio then I think the ISIG should be used
without regard to the -nographic option.

Thanks

Chris

Here is a patch to affect this change:
Index: vl.c
===================================================================
--- vl.c        (revision 4995)
+++ vl.c        (working copy)
@@ -2368,8 +2368,7 @@
     tty.c_oflag |= OPOST;
     tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN);
     /* if graphical mode, we allow Ctrl-C handling */
-    if (nographic)
-        tty.c_lflag &= ~ISIG;
+    tty.c_lflag &= ~ISIG;
     tty.c_cflag &= ~(CSIZE|PARENB);
     tty.c_cflag |= CS8;
     tty.c_cc[VMIN] = 1;




-----Original Message-----
From: address@hidden
[mailto:address@hidden On
Behalf Of Anthony Liguori
Sent: Monday, August 11, 2008 4:14 PM
To: address@hidden
Subject: Re: [Qemu-devel] Patch Send Ctrl-C to stdio target.

Krumme, Chris wrote:
> Hello,
>  
> This patch will catch a SIGINT and pass it as a ctrl-c to the target 
> when running with the target on stdio.
>   

Just catching SIGINT is kind of a hack.  What about SIGSTOP and SIGCONT?

If we're going to go this route, we should do it properly by cfmakeraw()
stdio instead of trapping individual signals.

Regards,

Anthony Liguori







reply via email to

[Prev in Thread] Current Thread [Next in Thread]