mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
* Re-land "Support multiple shells in a single process. (#4932)" This reverts commit 723c7d01439da4261bc836075fb55651ce9e7f03.
36 lines
573 B
C++
36 lines
573 B
C++
// Copyright 2018 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "flutter/fml/unique_fd.h"
|
|
|
|
#include "lib/fxl/files/eintr_wrapper.h"
|
|
|
|
namespace fml {
|
|
namespace internal {
|
|
|
|
#if OS_WIN
|
|
|
|
namespace win {
|
|
|
|
void UniqueFDTraits::Free(HANDLE fd) {
|
|
CloseHandle(fd);
|
|
}
|
|
|
|
} // namespace win
|
|
|
|
#else // OS_WIN
|
|
|
|
namespace unix {
|
|
|
|
void UniqueFDTraits::Free(int fd) {
|
|
IGNORE_EINTR(fd);
|
|
}
|
|
|
|
} // namespace unix
|
|
|
|
#endif // OS_WIN
|
|
|
|
} // namespace internal
|
|
} // namespace fml
|