In the user mode network development process, SIGALRM makes getaddrinfo() fails in virtio net thread. Blocking SIGALRM solves this problem. SIGALRM is used by the console code to inject interrupt periodically. Signed-off-by: Asias He <asias.hejun@xxxxxxxxx> --- tools/kvm/virtio/net.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/tools/kvm/virtio/net.c b/tools/kvm/virtio/net.c index 6916af6..ad5fa3f 100644 --- a/tools/kvm/virtio/net.c +++ b/tools/kvm/virtio/net.c @@ -91,6 +91,8 @@ static void *virtio_net_rx_thread(void *p) u16 head; int len; + sig_block(SIGALRM); + kvm = p; vq = &ndev.vqs[VIRTIO_NET_RX_QUEUE]; @@ -125,6 +127,8 @@ static void *virtio_net_tx_thread(void *p) u16 head; int len; + sig_block(SIGALRM); + kvm = p; vq = &ndev.vqs[VIRTIO_NET_TX_QUEUE]; -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html