mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
core-util: log error if we hit file descriptors limit
This commit is contained in:
parent
a2f3a7bf4d
commit
8cda1fe3e2
1 changed files with 20 additions and 0 deletions
|
|
@ -3493,6 +3493,16 @@ int pa_pipe_cloexec(int pipefd[2]) {
|
||||||
if ((r = pipe2(pipefd, O_CLOEXEC)) >= 0)
|
if ((r = pipe2(pipefd, O_CLOEXEC)) >= 0)
|
||||||
goto finish;
|
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)
|
if (errno != EINVAL && errno != ENOSYS)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
|
@ -3501,6 +3511,16 @@ int pa_pipe_cloexec(int pipefd[2]) {
|
||||||
if ((r = pipe(pipefd)) >= 0)
|
if ((r = pipe(pipefd)) >= 0)
|
||||||
goto finish;
|
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 error */
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue