From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Using signals to communicate two Qemu processes Date: Tue, 23 Dec 2008 19:17:21 +0200 Message-ID: <49511D21.2040403@redhat.com> References: <18C018878FB0244EB71B7FE328978A320F9FDA4C@rrsmsx503.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "kvm@vger.kernel.org" To: "Passera, Pablo R" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:59027 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751158AbYLWRRY (ORCPT ); Tue, 23 Dec 2008 12:17:24 -0500 In-Reply-To: <18C018878FB0244EB71B7FE328978A320F9FDA4C@rrsmsx503.amr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Passera, Pablo R wrote: > Hi all, > I am trying to communicate two VMs using a virtio driver. Once a data is moved to the driver I want to notify the other Qemu process that there is new data available in the buffer. I was thinking about using linux signals to synchronize both processes but when I register my SIGUSR1 handler in Qemu I am seeing an strange behavior. After starting the VM and Linux gets loaded, Qemu is receiving SIGUSR2 at a regular time period. Looking a little bit at the code I realize that signals are being used for other purposes in Qemu, however, SIGUSR1 is not used. Is it possible to use signals to synchronize these processes or should I think about using a different mechanism? > Signals are messy. I recommend using a unix-domain socket for this. It should be possible to use signals, however you should take care to mask the signal in all threads except the once you want to be the handler. -- error compiling committee.c: too many arguments to function