diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-08-26 15:44:55 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-08-26 15:44:55 +0200 |
commit | 0a1f654c201bab8b76d46fb58453e3a64c01c9a2 (patch) | |
tree | df783a5f94cc9c64a92d1fe0ba3f47f54e125c07 | |
parent | 2a78f865c15802cd21f36389aaf663fe3a680501 (diff) |
call close() in a loop to catch EINTR
-rw-r--r-- | src/pulsecore/core-util.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index 89416d8b..c78e8fd7 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -398,7 +398,15 @@ int pa_close(int fd) { } #endif - return close(fd); + for (;;) { + int r; + + if ((r = close(fd)) >= 0) + return r; + + if (errno != EINTR) + return r; + } } /* Print a warning messages in case that the given signal is not |