qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Multiple QMP socket clients
Date: Tue, 11 Oct 2016 15:08:34 +0100	[thread overview]
Message-ID: <20161011140834.GA16796@work-vm> (raw)
In-Reply-To: <20161011131107.GF14917@redhat.com>

* Daniel P. Berrange (berrange@redhat.com) wrote:
> On Tue, Oct 11, 2016 at 12:26:37PM +0200, Samuel Ortiz wrote:
> > Hi,
> > 
> > On a qemu instance started with a qmp unix socket:
> > 
> > -qmp unix:/tmp/ctrl.sock,server,nowait
> > 
> > I am trying to have multiple clients working on that socket but
> > although the qmp server seems to accept the connections, only the first
> > connected client gets his request processed. The next client requests
> > will just hang until the first one exits.
> > 
> > Is that an intended behaviour ?
> 
> Yes, the character device code is designed around the idea of a single
> endpoint.
> 
> In the case of the monitor you could work around it by adding multiple
> -qmp arguemnts, each with different socket. Of course you have to make
> sure each client doesn't trample on the other client when doing this.

But why does it accept the connection?
I thought you could say only accept a single connection on a socket.
(The backlog parameter to listen(2) but I can't find out listen.)

Dave

> 
> 
> Regards,
> Daniel
> -- 
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org              -o-             http://virt-manager.org :|
> |: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2016-10-11 14:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-11 10:26 [Qemu-devel] Multiple QMP socket clients Samuel Ortiz
2016-10-11 13:11 ` Daniel P. Berrange
2016-10-11 14:08   ` Dr. David Alan Gilbert [this message]
2016-10-11 14:17     ` Daniel P. Berrange
2016-10-11 14:26       ` Daniel P. Berrange
2016-10-11 15:12         ` Dr. David Alan Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161011140834.GA16796@work-vm \
    --to=dgilbert@redhat.com \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).