Re: [Qemu-devel] [PATCH] -nographic sometimes adds an extra chardev for stdio

2014-04-29 Thread Mike Day
On Tue, Apr 29, 2014 at 1:02 AM, Michael Tokarev wrote: > I guess we should have some global variable like "stdio_occuped", set > it to 1 when -daemonize is specified, and set and check it each time > we try to use stdio for something. This way we'll prevent various > parts of qemu from fighting

Re: [Qemu-devel] [PATCH] -nographic sometimes adds an extra chardev for stdio

2014-04-29 Thread Mike Day
On Tue, Apr 29, 2014 at 3:09 AM, Gerd Hoffmann wrote: > > I don't feel like adding more band-aid to paper over the fundamental > issue. Too much band-aid tends to cause other unwanted side effects. Fair enough, I tend to agree. thanks for the review. Mike

Re: [Qemu-devel] [PATCH] -nographic sometimes adds an extra chardev for stdio

2014-04-29 Thread Gerd Hoffmann
On Mo, 2014-04-28 at 11:00 -0400, Mike Day wrote: > When the deprecated -nographic option is used with the -mon option in > readline mode, qemu will create a second character device for stdio > and place it over the stdio chardev put into place by the -mon > option. This causes the terminal to stop

Re: [Qemu-devel] [PATCH] -nographic sometimes adds an extra chardev for stdio

2014-04-28 Thread Michael Tokarev
[am...@redhat.com bounces, removed from Cc] 29.04.2014 00:07, Mike Day wrote: [] > Suggestions much appreciated, I think its ugly versus intrusive, but > I'm not familiar with this part of qemu. > > There is another case with -monitor where you can configure two > chardevs for stdio and it does t

Re: [Qemu-devel] [PATCH] -nographic sometimes adds an extra chardev for stdio

2014-04-28 Thread Mike Day
On Mon, Apr 28, 2014 at 3:53 PM, Michael Tokarev wrote: > Gosh. This is uuugly. > > Maybe, at least, we can add some variable which gets incremented for > each -mon chardev= ? I dunno, that's about the same ugliness. Oh > well... :( Suggestions much appreciated, I think its ugly versus intr

Re: [Qemu-devel] [PATCH] -nographic sometimes adds an extra chardev for stdio

2014-04-28 Thread Michael Tokarev
28.04.2014 19:00, Mike Day wrote: > When the deprecated -nographic option is used with the -mon option in > readline mode, qemu will create a second character device for stdio > and place it over the stdio chardev put into place by the -mon > option. This causes the terminal to stop echoeing charac

[Qemu-devel] [PATCH] -nographic sometimes adds an extra chardev for stdio

2014-04-28 Thread Mike Day
When the deprecated -nographic option is used with the -mon option in readline mode, qemu will create a second character device for stdio and place it over the stdio chardev put into place by the -mon option. This causes the terminal to stop echoeing characters upon exit from Qemu. Fix by checking