This commit is contained in:
parent
9fb87cd924
commit
4bce95ac8d
|
@ -28,8 +28,11 @@ struct HGNamedPipeOutImpl
|
||||||
CloseHandle(m_hConnectEvent);
|
CloseHandle(m_hConnectEvent);
|
||||||
m_hConnectEvent = NULL;
|
m_hConnectEvent = NULL;
|
||||||
#else
|
#else
|
||||||
close(m_fdPipe);
|
if (-1 != m_fdPipe)
|
||||||
m_fdPipe = -1;
|
{
|
||||||
|
close(m_fdPipe);
|
||||||
|
m_fdPipe = -1;
|
||||||
|
}
|
||||||
unlink(m_filePath.c_str());
|
unlink(m_filePath.c_str());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -65,8 +68,11 @@ struct HGNamedPipeInImpl
|
||||||
CloseHandle(m_hReadEvent);
|
CloseHandle(m_hReadEvent);
|
||||||
m_hReadEvent = NULL;
|
m_hReadEvent = NULL;
|
||||||
#else
|
#else
|
||||||
close(m_fdPipe);
|
if (-1 != m_fdPipe)
|
||||||
m_fdPipe = -1;
|
{
|
||||||
|
close(m_fdPipe);
|
||||||
|
m_fdPipe = -1;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,6 +227,11 @@ HGResult HGAPI HGBase_StopWriteNamedPipe(HGNamedPipeOut pipeOut)
|
||||||
SetEvent(pipeOutImpl->m_hConnectEvent);
|
SetEvent(pipeOutImpl->m_hConnectEvent);
|
||||||
SetEvent(pipeOutImpl->m_hWriteEvent);
|
SetEvent(pipeOutImpl->m_hWriteEvent);
|
||||||
#else
|
#else
|
||||||
|
if (-1 != pipeInImpl->m_fdPipe)
|
||||||
|
{
|
||||||
|
close(pipeInImpl->m_fdPipe);
|
||||||
|
pipeInImpl->m_fdPipe = -1;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return HGBASE_ERR_OK;
|
return HGBASE_ERR_OK;
|
||||||
}
|
}
|
||||||
|
@ -333,6 +344,11 @@ HGResult HGAPI HGBase_StopReadNamedPipe(HGNamedPipeIn pipeIn)
|
||||||
#if defined(HG_CMP_MSC)
|
#if defined(HG_CMP_MSC)
|
||||||
SetEvent(pipeInImpl->m_hReadEvent);
|
SetEvent(pipeInImpl->m_hReadEvent);
|
||||||
#else
|
#else
|
||||||
|
if (-1 != pipeInImpl->m_fdPipe)
|
||||||
|
{
|
||||||
|
close(pipeInImpl->m_fdPipe);
|
||||||
|
pipeInImpl->m_fdPipe = -1;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return HGBASE_ERR_OK;
|
return HGBASE_ERR_OK;
|
||||||
}
|
}
|
Loading…
Reference in New Issue