mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
Added handling of FD_CLOEXEC flag
This commit is contained in:
parent
e5b227961e
commit
a313072961
5 changed files with 43 additions and 11 deletions
|
|
@ -228,6 +228,12 @@ int snd_rawmidi_hw_open(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp,
|
|||
return -errno;
|
||||
}
|
||||
}
|
||||
if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0) {
|
||||
SYSERR("fcntl FD_CLOEXEC failed");
|
||||
ret = -errno;
|
||||
close(fd);
|
||||
return ret;
|
||||
}
|
||||
if (ioctl(fd, SNDRV_RAWMIDI_IOCTL_PVERSION, &ver) < 0) {
|
||||
ret = -errno;
|
||||
SYSERR("SNDRV_RAWMIDI_IOCTL_PVERSION failed");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue