starting pipes

This commit is contained in:
2025-08-12 21:44:50 +03:00
parent 91955d44fa
commit 6ffbbbe636
2 changed files with 93 additions and 76 deletions

View File

@@ -55,36 +55,6 @@ public:
//! \~russian Возвращает ID процесса текущего выполнения
int pID() const;
void setGrabInput(bool yes) { g_in = yes; }
//! \~english Set attached execution grab output stream enabled
//! \~russian
void setGrabOutput(bool yes) { g_out = yes; }
//! \~english Set attached execution grab error stream enabled
//! \~russian
void setGrabError(bool yes) { g_err = yes; }
void setInputFile(const PIString & path) { f_in.setPath(path); }
//! \~english Set attached execution grab output stream file
//! \~russian
void setOutputFile(const PIString & path) { f_out.setPath(path); }
//! \~english Set attached execution grab error stream file
//! \~russian
void setErrorFile(const PIString & path) { f_err.setPath(path); }
void unsetInputFile() { f_in.setPath(""); }
//! \~english Reset attached execution grab output stream file
//! \~russian
void unsetOutputFile() { f_out.setPath(""); }
//! \~english Reset attached execution grab error stream file
//! \~russian
void unsetErrorFile() { f_err.setPath(""); }
//! \~english Returns current attached execution working directory or empty string if it wasn`t set
//! \~russian
PIString workingDirectory() const { return wd; }
@@ -220,14 +190,11 @@ private:
void run() override;
void exec_();
void startProc(bool detached);
PIByteArray readFile(PIFile & f, bool clear);
private:
PRIVATE_DECLARATION(PIP_EXPORT)
PIStringList args, env;
PIString wd;
PIByteArray out;
PIFile f_in, f_out, f_err;
bool g_in, g_out, g_err, t_in, t_out, t_err;
int exit_code;
bool is_exec;
};