From 979c9097191a08b2b816523bc7e10218b6a3382b Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Wed, 5 Oct 2011 13:12:21 +0200 Subject: [PATCH] handle EINTR returned by connect() --- libsndio/aucat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libsndio/aucat.c b/libsndio/aucat.c index 382a5c9..eb71b60 100644 --- a/libsndio/aucat.c +++ b/libsndio/aucat.c @@ -353,7 +353,10 @@ aucat_connect_tcp(struct aucat *hdl, char *host, char *unit, int isaudio) DPERROR("socket"); continue; } + restart: if (connect(s, ai->ai_addr, ai->ai_addrlen) < 0) { + if (errno == EINTR) + goto restart; DPERROR("connect"); close(s); s = -1;