#include "oct-procbuf.h"
Public Member Functions | |
procbuf () | |
procbuf (const char *command, int mode) | |
~procbuf () | |
procbuf * | close () |
bool | is_open () const |
procbuf * | open (const char *command, int mode) |
pid_t | pid () const |
int | wait_status () const |
Public Member Functions inherited from c_file_ptr_buf | |
c_file_ptr_buf ()=delete | |
c_file_ptr_buf (FILE *f, close_fcn cf=file_close) | |
~c_file_ptr_buf () | |
int | buf_close () |
void | clear () |
int | file_number () const |
int | flush () |
int_type | overflow (int_type) |
int_type | pbackfail (int_type) |
int | seek (off_t offset, int origin) |
std::streampos | seekoff (std::streamoff, std::ios::seekdir, std::ios::openmode=std::ios::in|std::ios::out) |
std::streampos | seekpos (std::streampos, std::ios::openmode=std::ios::in|std::ios::out) |
FILE * | stdiofile () |
int | sync () |
off_t | tell () |
int_type | uflow () |
int_type | underflow () |
std::streamsize | xsgetn (char *, std::streamsize) |
std::streamsize | xsputn (const char *, std::streamsize) |
Protected Attributes | |
procbuf * | m_next |
bool | m_open_p |
pid_t | m_proc_pid |
int | m_wstatus |
Protected Attributes inherited from c_file_ptr_buf | |
close_fcn | m_cf |
FILE * | m_f |
Additional Inherited Members | |
Public Types inherited from c_file_ptr_buf | |
typedef int(* | close_fcn) (FILE *) |
typedef std::streambuf::int_type | int_type |
Static Public Member Functions inherited from c_file_ptr_buf | |
static int | file_close (FILE *m_f) |
Definition at line 40 of file oct-procbuf.h.
|
inline |
Definition at line 45 of file oct-procbuf.h.
|
inline |
Definition at line 50 of file oct-procbuf.h.
|
inline |
Definition at line 57 of file oct-procbuf.h.
procbuf * procbuf::close | ( | ) |
Definition at line 185 of file oct-procbuf.cc.
References c_file_ptr_buf::m_f, m_next, m_open_p, m_proc_pid, m_wstatus, octave::pclose(), and waitpid().
Referenced by procstreambase::close().
|
inline |
Definition at line 65 of file oct-procbuf.h.
Referenced by open().
procbuf * procbuf::open | ( | const char * | command, |
int | mode | ||
) |
Definition at line 79 of file oct-procbuf.cc.
References BUFSIZ, fork(), is_open(), c_file_ptr_buf::m_f, m_next, m_open_p, m_proc_pid, octave_close_wrapper(), octave_dup2_wrapper(), pipe(), octave::popen(), and SHELL_PATH.
Referenced by procstreambase::procstreambase(), and procstreambase::open().
|
inline |
Definition at line 67 of file oct-procbuf.h.
|
inline |
Definition at line 63 of file oct-procbuf.h.
Referenced by procstreambase::close().
|
protected |
Definition at line 77 of file oct-procbuf.h.
|
protected |
Definition at line 73 of file oct-procbuf.h.
|
protected |
Definition at line 75 of file oct-procbuf.h.
|
protected |
Definition at line 71 of file oct-procbuf.h.
Referenced by close().