Logo Search packages:      
Sourcecode: condor version File versions  Download package

int DaemonCore::Inherit_Pipe ( int  p,
bool  write,
bool  can_register,
bool  nonblocking,
int  psize = 4096 
)

Make DaemonCore aware of an inherited pipe.

Definition at line 1597 of file daemon_core.cpp.

{
      PipeHandle pipe_handle;

#if defined(WIN32)
      HANDLE h = (HANDLE)_get_osfhandle(fd);
      if (is_write) {
            pipe_handle = new WritePipeEnd(h, can_register, nonblocking, psize);
      }
      else {
            pipe_handle = new ReadPipeEnd(h, can_register, nonblocking, psize);
      }
#else
            // Shut the compiler up
            // These parameters are needed on Windows
      is_write = is_write;
      can_register = can_register;
      nonblocking = nonblocking;
      psize = psize;

      pipe_handle = fd;
#endif

      return pipeHandleTableInsert(pipe_handle) + PIPE_INDEX_OFFSET;
}


Generated by  Doxygen 1.6.0   Back to index