예제 #1
0
파일: pipe.cpp 프로젝트: gatgui/gcore
void gcore::Pipe::close() {
  if (isNamed() && isOwned()) {
#ifndef _WIN32
    gcore::String path = "/tmp/" + mName;
    closeRead();
    closeWrite();
    unlink(path.c_str());
#else
    if (mConnected) {
      FlushFileBuffers(mDesc[1]);
      DisconnectNamedPipe(mDesc[0]);
    }
    closeRead();
    closeWrite();
#endif
  } else {
    closeRead();
    closeWrite();
  }
  mName = "";
  mOwn = false;
#ifdef _WIN32
  mConnected = false;
#endif
}
예제 #2
0
bool KoStore::close()
{
  kdDebug(s_area) << "KoStore: Closing" << endl;

  if ( !m_bIsOpen )
  {
    kdWarning(s_area) << "KoStore: You must open before closing" << endl;
    //return KIO::ERR_INTERNAL;
    return false;
  }

  bool ret = m_mode == Write ? closeWrite() : closeRead();

  delete m_stream;
  m_stream = 0L;
  m_bIsOpen = false;
  return ret;
}
예제 #3
0
bool KoStore::close()
{
    Q_D(KoStore);
    kDebug(30002) << "Closing";

    if (!d->isOpen) {
        kWarning(30002) << "You must open before closing";
        //return KIO::ERR_INTERNAL;
        return false;
    }

    bool ret = d->mode == Write ? closeWrite() : closeRead();

    delete d->stream;
    d->stream = 0;
    d->isOpen = false;
    return ret;
}
예제 #4
0
void Pipe::close()
{
	closeRead();
	closeWrite();
}
예제 #5
0
void PipeImpl::closeBoth()
{
	closeRead();
	closeWrite();
}
예제 #6
0
PipeImpl::~PipeImpl()
{
	closeRead();
	closeWrite();
}