diff options
author | Josep Puigdemont <josep.puigdemont@linaro.org> | 2018-04-11 14:40:53 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2018-04-18 17:24:45 +0300 |
commit | 88ba35773c76c871a222fe48a0dac05765c39936 (patch) | |
tree | 62e639b5d371b4085a56d01d3221afccee58f9a5 | |
parent | 2e96afe0b7c4e7e41fb03bcda605ab704f538ca1 (diff) |
fdserver: handle signal interruption in connect()
Signed-off-by: Josep Puigdemont <josep.puigdemont@linaro.org>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
-rw-r--r-- | platform/linux-generic/odp_fdserver.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/linux-generic/odp_fdserver.c b/platform/linux-generic/odp_fdserver.c index c88c71cdc..0e9fb0e4d 100644 --- a/platform/linux-generic/odp_fdserver.c +++ b/platform/linux-generic/odp_fdserver.c @@ -265,7 +265,9 @@ static int get_socket(void) remote.sun_family = AF_UNIX; strcpy(remote.sun_path, sockpath); len = strlen(remote.sun_path) + sizeof(remote.sun_family); - if (connect(s_sock, (struct sockaddr *)&remote, len) == -1) { + while (connect(s_sock, (struct sockaddr *)&remote, len) == -1) { + if (errno == EINTR) + continue; ODP_ERR("cannot connect to server: %s\n", strerror(errno)); close(s_sock); return -1; |