ffmpeg/libavutil
Tobias Rapp 1bb7529ac2 avutil/file_open: avoid file handle inheritance on Windows
Avoids inheritance of file handles on Windows systems similar to the
O_CLOEXEC/FD_CLOEXEC flag on Linux.

Fixes file lock issues in Windows applications when a child process
is started with handle inheritance enabled (standard input/output
redirection) while a FFmpeg transcoding is running in the parent
process.

Links relevant to the subject:

https://msdn.microsoft.com/en-us/library/w7sa2b22.aspx

Describes the _wsopen() function and the O_NOINHERIT flag. File handles
opened by _wsopen() are inheritable by default.

https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx

Describes handle inheritance when creating new processes. Handle
inheritance must be enabled (bInheritHandles = TRUE) e.g. when you want
to pass handles for stdin/stdout via lpStartupInfo.

Signed-off-by: Tobias Rapp <t.rapp@noa-audio.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 474665346616e446ecd1407002fdf5f88201bf72)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-06 12:40:49 +01:00
..
2015-08-20 14:29:12 +02:00
2014-04-07 01:31:02 +02:00
2014-04-07 01:31:02 +02:00
2014-08-05 01:54:47 +02:00
2015-12-06 12:40:48 +01:00
2014-08-13 14:50:15 +02:00
2014-07-12 22:33:27 +02:00
2014-07-12 22:33:27 +02:00
2014-04-01 17:36:33 +02:00
2014-04-29 13:24:11 +02:00
2013-06-12 01:47:42 +02:00
2014-11-08 12:47:18 +01:00
2014-08-09 23:20:31 +02:00
2014-08-09 23:20:31 +02:00
2014-08-18 22:37:03 +02:00
2014-06-03 10:58:19 -08:00
2014-09-05 00:43:48 +02:00
2013-06-15 02:22:39 +02:00
2013-05-15 12:10:09 +02:00
2013-05-13 21:42:37 +02:00
2015-02-14 02:21:19 -03:00
2014-08-05 21:05:52 +02:00
2014-01-19 17:12:22 +01:00
2013-06-15 18:54:01 -03:00
2014-07-06 11:44:01 -07:00
2013-06-02 11:27:19 +02:00
2014-05-26 11:40:15 +02:00
2014-05-26 11:40:15 +02:00
2014-05-17 15:28:03 +02:00
2014-05-17 15:28:03 +02:00
2014-05-28 03:25:41 +02:00
2014-08-05 01:54:47 +02:00
2013-11-22 17:16:11 +01:00
2014-04-07 01:31:36 +02:00
2014-04-07 01:31:36 +02:00