MCPcopy Create free account
hub / github.com/catboost/catboost / Close

Method Close

util/system/pipe.cpp:21–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21bool TPipeHandle::Close() noexcept {
22 bool ok = true;
23 if (Fd_ != INVALID_PIPEHANDLE) {
24#ifdef _win_
25 ok = closesocket(Fd_) == 0;
26#else
27 ok = close(Fd_) == 0;
28#endif
29 }
30 Fd_ = INVALID_PIPEHANDLE;
31 return ok;
32}
33
34void TPipeHandle::Pipe(TPipeHandle& reader, TPipeHandle& writer, EOpenMode mode) {
35 PIPEHANDLE fds[2];

Callers 15

Y_UNIT_TESTFunction · 0.45
CloseMethod · 0.45
Y_UNIT_TESTFunction · 0.45
BasicTestFunction · 0.45
Y_UNIT_TESTFunction · 0.45
Y_UNIT_TESTFunction · 0.45
TestOpenMethod · 0.45
TestOpenSyncMethod · 0.45
TestRWMethod · 0.45
TestLocaleMethod · 0.45
TestFlushMethod · 0.45
TestFlushSpecialFileMethod · 0.45

Calls 1

closeFunction · 0.50

Tested by 10

TestOpenMethod · 0.36
TestOpenSyncMethod · 0.36
TestRWMethod · 0.36
TestLocaleMethod · 0.36
TestFlushMethod · 0.36
TestFlushSpecialFileMethod · 0.36
TestRawReadMethod · 0.36
TestReadMethod · 0.36
TestRawPreadMethod · 0.36
TestPreadMethod · 0.36