src/pulsecore/core-util.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
New commits: commit 8cda1fe3e2072aba21cfa9f90d707b029c07773c Author: Marcin Lewandowski <mar...@radiokit.org> Date: Thu Jun 30 12:38:14 2016 +0200 core-util: log error if we hit file descriptors limit diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index 350f35b..873f86a 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -3493,6 +3493,16 @@ int pa_pipe_cloexec(int pipefd[2]) { if ((r = pipe2(pipefd, O_CLOEXEC)) >= 0) goto finish; + if (errno == EMFILE) { + pa_log_error("The per-process limit on the number of open file descriptors has been reached."); + return r; + } + + if (errno == ENFILE) { + pa_log_error("The system-wide limit on the total number of open files has been reached."); + return r; + } + if (errno != EINVAL && errno != ENOSYS) return r; @@ -3501,6 +3511,16 @@ int pa_pipe_cloexec(int pipefd[2]) { if ((r = pipe(pipefd)) >= 0) goto finish; + if (errno == EMFILE) { + pa_log_error("The per-process limit on the number of open file descriptors has been reached."); + return r; + } + + if (errno == ENFILE) { + pa_log_error("The system-wide limit on the total number of open files has been reached."); + return r; + } + /* return error */ return r; _______________________________________________ pulseaudio-commits mailing list pulseaudio-commits@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/pulseaudio-commits