* [alsa-devel] [PATCH] do not set close-on-exec flag on descriptor if it was already set
@ 2020-02-11 10:22 Rolf Eike Beer
2020-02-11 11:13 ` Jaroslav Kysela
0 siblings, 1 reply; 2+ messages in thread
From: Rolf Eike Beer @ 2020-02-11 10:22 UTC (permalink / raw)
To: patch; +Cc: alsa-devel
There is no need to set this again if O_CLOEXEC is supported.
Signed-off-by: Rolf Eike Beer <eb@emlix.com>
---
include/local.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/local.h b/include/local.h
index ea0ec32d..ed6ba936 100644
--- a/include/local.h
+++ b/include/local.h
@@ -320,8 +320,10 @@ static inline int snd_open_device(const char *filename, int fmode)
fd = rsm_open_device(filename, fmode);
}
#endif
+#ifndef O_CLOEXEC
if (fd >= 0)
fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
return fd;
}
--
2.25.0
--
Rolf Eike Beer, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055
emlix - smart embedded open source
Besuchen Sie uns auf der Embedded World 2020 in Nürnberg!
-> Halle 4, Stand 368
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [alsa-devel] [PATCH] do not set close-on-exec flag on descriptor if it was already set
2020-02-11 10:22 [alsa-devel] [PATCH] do not set close-on-exec flag on descriptor if it was already set Rolf Eike Beer
@ 2020-02-11 11:13 ` Jaroslav Kysela
0 siblings, 0 replies; 2+ messages in thread
From: Jaroslav Kysela @ 2020-02-11 11:13 UTC (permalink / raw)
To: Rolf Eike Beer, patch; +Cc: alsa-devel
Dne 11. 02. 20 v 11:22 Rolf Eike Beer napsal(a):
> There is no need to set this again if O_CLOEXEC is supported.
Thanks. Applied.
Jroslav
>
> Signed-off-by: Rolf Eike Beer <eb@emlix.com>
> ---
> include/local.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/local.h b/include/local.h
> index ea0ec32d..ed6ba936 100644
> --- a/include/local.h
> +++ b/include/local.h
> @@ -320,8 +320,10 @@ static inline int snd_open_device(const char *filename, int fmode)
> fd = rsm_open_device(filename, fmode);
> }
> #endif
> +#ifndef O_CLOEXEC
> if (fd >= 0)
> fcntl(fd, F_SETFD, FD_CLOEXEC);
> +#endif
> return fd;
> }
>
>
--
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-11 11:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-11 10:22 [alsa-devel] [PATCH] do not set close-on-exec flag on descriptor if it was already set Rolf Eike Beer
2020-02-11 11:13 ` Jaroslav Kysela
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.