Skip to content

Change Fopen() mode param to always include 'e' and 'b'

Sean McBride requested to merge seanm/vtk:close-exec-part2 into master

'e' is recommend in UNIX to ensure the file is closed after any fork/exec. Not sure if it does anything in Windows.

'b' does nothing in UNIX, but does under Windows, where it specifies 'b'inary, and won't do any text line ending conversions. By always specifying 'b' we have one less behaviour difference between platforms.

Used the following regexes to make these changes:

vtksys::SystemTools::Fopen(.)"r" vtksys::SystemTools::Fopen(.)"rb" vtksys::SystemTools::Fopen(.)"w" vtksys::SystemTools::Fopen(.)"wb"

Merge request reports