mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Added process reader/writer exit code.
This commit is contained in:
@@ -256,7 +256,7 @@ namespace bx
|
||||
virtual void close() BX_OVERRIDE
|
||||
{
|
||||
BX_CHECK(NULL != m_file, "Process not open!");
|
||||
pclose(m_file);
|
||||
m_exitCode = pclose(m_file);
|
||||
m_file = NULL;
|
||||
}
|
||||
|
||||
@@ -282,8 +282,14 @@ namespace bx
|
||||
return size;
|
||||
}
|
||||
|
||||
int32_t getExitCode() const
|
||||
{
|
||||
return m_exitCode;
|
||||
}
|
||||
|
||||
private:
|
||||
FILE* m_file;
|
||||
int32_t m_exitCode;
|
||||
};
|
||||
|
||||
class ProcessWriter : public WriterOpenI, public CloserI, public WriterI
|
||||
@@ -316,7 +322,7 @@ namespace bx
|
||||
virtual void close() BX_OVERRIDE
|
||||
{
|
||||
BX_CHECK(NULL != m_file, "Process not open!");
|
||||
pclose(m_file);
|
||||
m_exitCode = pclose(m_file);
|
||||
m_file = NULL;
|
||||
}
|
||||
|
||||
@@ -338,8 +344,14 @@ namespace bx
|
||||
return size;
|
||||
}
|
||||
|
||||
int32_t getExitCode() const
|
||||
{
|
||||
return m_exitCode;
|
||||
}
|
||||
|
||||
private:
|
||||
FILE* m_file;
|
||||
int32_t m_exitCode;
|
||||
};
|
||||
|
||||
#endif // BX_CONFIG_CRT_PROCESS
|
||||
|
||||
Reference in New Issue
Block a user