do not set close-on-exec flag on descriptor if it was already set
PATCH 1/1 do not set close-on-exec flag on descriptor if it was already set
There is no need to set this again if O_CLOEXEC is supported.
Signed-off-by Rolf Eike Beer <[email protected]>
--- include/local.h | 2 ++ 1 file changed, 2 insertions(+)
include/local.h +2 -0
@@ -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; }
Signature · 21 lines
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 [email protected] https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Dne 11. 02. 20 v 11:22 Rolf Eike Beer napsal(a):
Quoted 1 line
There is no need to set this again if
O_CLOEXECis supported.
Thanks. Applied.
Jroslav
Quoted 22 lines
Signed-off-by Rolf Eike Beer <[email protected]>--- include/local.h | 2 ++ 1 file changed, 2 insertions(+)include/local.h +2
-0@@ -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; }
Signature · 6 lines
Jaroslav Kysela <[email protected]> Linux Sound Maintainer; ALSA Project; Red Hat, Inc. _______________________________________________ Alsa-devel mailing list [email protected] https://mailman.alsa-project.org/mailman/listinfo/alsa-devel