Exemplo n.º 1
0
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
}
Exemplo n.º 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;
}
Exemplo n.º 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;
}
Exemplo n.º 4
0
void Pipe::close()
{
	closeRead();
	closeWrite();
}
Exemplo n.º 5
0
void PipeImpl::closeBoth()
{
	closeRead();
	closeWrite();
}
Exemplo n.º 6
0
PipeImpl::~PipeImpl()
{
	closeRead();
	closeWrite();
}