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

int DaemonCore::Write_Stdin_Pipe ( int  pid,
const void *  buffer,
int  len 
)

Write data to the given DC process's stdin pipe.

See also:
pipeFullWrite()

Definition at line 1977 of file daemon_core.cpp.

References Register_Pipe().

                                                                 {
      PidEntry *pidinfo = NULL;
      if ((pidTable->lookup(pid, pidinfo) < 0)) {
                  // we have no information on this pid
                  // TODO-pipe: set custom errno?
            return -1;
      }
      if (pidinfo->std_pipes[0] == DC_STD_FD_NOPIPE) {
                  // No pipe found.
                  // TODO-pipe: set custom errno?
            return -1;
      }
      pidinfo->pipe_buf[0] = new MyString;
      *pidinfo->pipe_buf[0] = (char*)buffer;
      daemonCore->Register_Pipe(pidinfo->std_pipes[0], "DC stdin pipe", (PipeHandlercpp)& DaemonCore::PidEntry::pipeFullWrite, "Guarantee all data written to pipe", pidinfo, HANDLE_WRITE);
      return 0;
}


Generated by  Doxygen 1.6.0   Back to index