mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
use pa_fopen_cloexec() where applicable
This commit is contained in:
parent
88b72958be
commit
168be3830a
14 changed files with 27 additions and 27 deletions
|
|
@ -349,9 +349,9 @@ int pa_oss_get_hw_description(const char *dev, char *name, size_t l) {
|
|||
if ((n = get_device_number(dev)) < 0)
|
||||
return -1;
|
||||
|
||||
if (!(f = fopen("/dev/sndstat", "r")) &&
|
||||
!(f = fopen("/proc/sndstat", "r")) &&
|
||||
!(f = fopen("/proc/asound/oss/sndstat", "r"))) {
|
||||
if (!(f = pa_fopen_cloexec("/dev/sndstat", "r")) &&
|
||||
!(f = pa_fopen_cloexec("/proc/sndstat", "r")) &&
|
||||
!(f = pa_fopen_cloexec("/proc/asound/oss/sndstat", "r"))) {
|
||||
|
||||
if (errno != ENOENT)
|
||||
pa_log_warn("failed to open OSS sndstat device: %s", pa_cstrerror(errno));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue