We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8438af2 commit 3c3a385Copy full SHA for 3c3a385
1 file changed
code/scripting/lua.cpp
@@ -131,6 +131,10 @@ static int io_open_limited (lua_State *L) {
131
auto file_type = GetFileType(handle);
132
CloseHandle(handle);
133
file_allowed = (file_type == FILE_TYPE_PIPE) || (file_type == FILE_TYPE_CHAR);
134
+ if (file_type == FILE_TYPE_PIPE) {
135
+ //For pipes only, we should make sure that the handler has actually closed before continuing.
136
+ WaitNamedPipeA(filename, 30000);
137
+ }
138
}
139
#else
140
struct stat file_stat_buffer;
0 commit comments