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