summaryrefslogtreecommitdiff
path: root/src/seq
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2003-02-04 13:35:59 +0000
committerJaroslav Kysela <perex@perex.cz>2003-02-04 13:35:59 +0000
commita3130729619d6b05f32244ea6fe1d83cc52ff749 (patch)
tree955c97629ecfde47f91e753666f2e295777f4a9a /src/seq
parente5b227961e3d27cecdd8de9001126e544b8204bb (diff)
Added handling of FD_CLOEXEC flag
Diffstat (limited to 'src/seq')
-rw-r--r--src/seq/seq_hw.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/seq/seq_hw.c b/src/seq/seq_hw.c
index af667032..532395ef 100644
--- a/src/seq/seq_hw.c
+++ b/src/seq/seq_hw.c
@@ -447,6 +447,12 @@ int snd_seq_hw_open(snd_seq_t **handle, const char *name, int streams, int mode)
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_SEQ_IOCTL_PVERSION, &ver) < 0) {
SYSERR("SNDRV_SEQ_IOCTL_PVERSION failed");
close(fd);