]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Remove old commented-out FD_CLOEXEC code
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 5 Nov 2009 19:17:41 +0000 (21:17 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sun, 8 Nov 2009 08:23:22 +0000 (09:23 +0100)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/control/control_hw.c
src/hwdep/hwdep_hw.c
src/pcm/pcm_hw.c
src/rawmidi/rawmidi_hw.c
src/seq/seq_hw.c
src/timer/timer_hw.c

index e9a6be274e03c07d0c65686fd86aa799c1813123..cf258b43646c5109f692fd1e99d61772ca0fb1af 100644 (file)
@@ -392,17 +392,6 @@ int snd_ctl_hw_open(snd_ctl_t **handle, const char *name, int card, int mode)
                if (fd < 0)
                        return -errno;
        }
-#if 0
-       /*
-        * this is bogus, an application have to care about open filedescriptors
-        */
-       if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0) {
-               SYSERR("fcntl FD_CLOEXEC failed");
-               err = -errno;
-               close(fd);
-               return err;
-       }
-#endif
        if (ioctl(fd, SNDRV_CTL_IOCTL_PVERSION, &ver) < 0) {
                err = -errno;
                close(fd);
index 238a507a8475fa422e5a5a924d6f5573bd445425..e4fcdc39f228ffa26cd1eb53227d21a0bd8156e3 100644 (file)
@@ -122,17 +122,6 @@ int snd_hwdep_hw_open(snd_hwdep_t **handle, const char *name, int card, int devi
                if (fd < 0)
                        return -errno;
        }
-#if 0
-       /*
-        * this is bogus, an application have to care about open filedescriptors
-        */
-       if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0) {
-               SYSERR("fcntl FD_CLOEXEC failed");
-               ret = -errno;
-               close(fd);
-               return ret;
-       }
-#endif
        if (ioctl(fd, SNDRV_HWDEP_IOCTL_PVERSION, &ver) < 0) {
                ret = -errno;
                close(fd);
index 8abb20452815cf27cb3b305dbddf5a9599767ae2..2095b018b714ac7961e21076325624147fd18e56 100644 (file)
@@ -1144,18 +1144,6 @@ int snd_pcm_hw_open_fd(snd_pcm_t **pcmp, const char *name,
        if (fmode & O_ASYNC)
                mode |= SND_PCM_ASYNC;
 
-#if 0
-       /*
-        * this is bogus, an application have to care about open filedescriptors
-        */
-       if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0) {
-               ret = -errno;
-               SYSMSG("fcntl FD_CLOEXEC failed");
-               close(fd);
-               return ret;
-       }
-#endif
-
        if (ioctl(fd, SNDRV_PCM_IOCTL_PVERSION, &ver) < 0) {
                ret = -errno;
                SYSMSG("SNDRV_PCM_IOCTL_PVERSION failed");
index 87829fd710eb1b530f6dd28d47ea14be1433e4f8..e08dca7da89e14f7242ac8a31ead181da66e79fc 100644 (file)
@@ -234,17 +234,6 @@ int snd_rawmidi_hw_open(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp,
                        return -errno;
                }
        }
-#if 0
-       /*
-        * this is bogus, an application have to care about open filedescriptors
-        */
-       if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0) {
-               SYSERR("fcntl FD_CLOEXEC failed");
-               ret = -errno;
-               close(fd);
-               return ret;
-       }
-#endif
        if (ioctl(fd, SNDRV_RAWMIDI_IOCTL_PVERSION, &ver) < 0) {
                ret = -errno;
                SYSERR("SNDRV_RAWMIDI_IOCTL_PVERSION failed");
index 0e945932b223fcd0854e45f672a1f2be2b0b71eb..5bb26f34aed833a9eaeff4516dec1ee7c6062ffa 100644 (file)
@@ -457,17 +457,6 @@ int snd_seq_hw_open(snd_seq_t **handle, const char *name, int streams, int mode)
                SYSERR("open %s failed", filename);
                return -errno;
        }
-#if 0
-       /*
-         * this is bogus, an application have to care about open filedescriptors
-        */                          
-       if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0) {
-               SYSERR("fcntl FD_CLOEXEC failed");
-               ret = -errno;
-               close(fd);
-               return ret;
-       }
-#endif
        if (ioctl(fd, SNDRV_SEQ_IOCTL_PVERSION, &ver) < 0) {
                SYSERR("SNDRV_SEQ_IOCTL_PVERSION failed");
                ret = -errno;
index 34538584a1ff21f051bfd8de4367e8274c41c3d8..25f3bab986d762afafb5aa2601a5d493ab93bf63 100644 (file)
@@ -236,17 +236,6 @@ int snd_timer_hw_open(snd_timer_t **handle, const char *name, int dev_class, int
        fd = snd_open_device(SNDRV_FILE_TIMER, tmode);
        if (fd < 0)
                return -errno;
-#if 0
-       /*
-        * this is bogus, an application have to care about open filedescriptors
-        */
-       if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0) {
-               SYSERR("fcntl FD_CLOEXEC failed");
-               ret = -errno;
-               close(fd);
-               return ret;
-       }
-#endif
        if (ioctl(fd, SNDRV_TIMER_IOCTL_PVERSION, &ver) < 0) {
                ret = -errno;
                close(fd);