diff options
author | Jaroslav Kysela <perex@perex.cz> | 2003-02-04 13:35:59 +0000 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2003-02-04 13:35:59 +0000 |
commit | a3130729619d6b05f32244ea6fe1d83cc52ff749 (patch) | |
tree | 955c97629ecfde47f91e753666f2e295777f4a9a /src/seq | |
parent | e5b227961e3d27cecdd8de9001126e544b8204bb (diff) |
Added handling of FD_CLOEXEC flag
Diffstat (limited to 'src/seq')
-rw-r--r-- | src/seq/seq_hw.c | 6 |
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); |