mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
use cloexec wrappers wherever applicable
This commit is contained in:
parent
9c1a98953f
commit
65e7bc18a9
25 changed files with 39 additions and 91 deletions
|
|
@ -238,12 +238,11 @@ int pa__init(pa_module*m) {
|
|||
u->filename = pa_runtime_path(pa_modargs_get_value(ma, "file", DEFAULT_FILE_NAME));
|
||||
|
||||
mkfifo(u->filename, 0666);
|
||||
if ((u->fd = open(u->filename, O_RDWR|O_NOCTTY)) < 0) {
|
||||
if ((u->fd = pa_open_cloexec(u->filename, O_RDWR, 0)) < 0) {
|
||||
pa_log("open('%s'): %s", u->filename, pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
pa_make_fd_cloexec(u->fd);
|
||||
pa_make_fd_nonblock(u->fd);
|
||||
|
||||
if (fstat(u->fd, &st) < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue