8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 02:03:03 +01:00

Close handle refering to parent process

This commit is contained in:
asfernandes 2009-03-09 01:42:29 +00:00
parent bf9a8bacb6
commit 2c92602c66

View File

@ -587,12 +587,14 @@ static HANDLE parse_args(LPCSTR lpszArgs, USHORT* pserver_flag)
exit(FINI_ERROR);
}
if (!DuplicateHandle(parent_handle, connection_handle, GetCurrentProcess(), &connection_handle,
0, FALSE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE))
if (!DuplicateHandle(parent_handle, connection_handle, GetCurrentProcess(), &connection_handle,
0, FALSE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE))
{
gds__log("SERVER: DuplicateHandle failed. Errno = %d, parent PID = %d", GetLastError(), parent_id);
exit(FINI_ERROR);
}
CloseHandle(parent_handle);
}
}
break;