[+] AuProcesses::IProcess::GetOutputAndInputHandles()

[+] AuProcesses::IProcess::GetErrorStreamHandle()
This commit is contained in:
Reece Wilson 2023-09-16 22:08:10 +01:00
parent 644c294c36
commit f13efd0cbf
5 changed files with 47 additions and 11 deletions

View File

@ -94,5 +94,17 @@ namespace Aurora::Processes
* @return
*/
virtual AuSPtr<IO::IAsyncTransaction> NewErrorStreamAsyncTransaction() = 0;
/**
* @brief returns the handle backing NewAsyncTransaction
* @return
*/
virtual AuSPtr<IO::IIOHandle> GetOutputAndInputHandles() = 0;
/**
* @brief returns the handle backing NewErrorStreamAsyncTransaction
* @return
*/
virtual AuSPtr<IO::IIOHandle> GetErrorStreamHandle() = 0;
};
}

View File

@ -496,6 +496,16 @@ namespace Aurora::Processes
return this->fsErrorStream_ ? this->fsErrorStream_->NewTransaction() : AuSPtr<AuIO::IAsyncTransaction> {};
}
AuSPtr<IO::IIOHandle> ProcessImpl::GetOutputAndInputHandles()
{
return this->fsHandle_;
}
AuSPtr<IO::IIOHandle> ProcessImpl::GetErrorStreamHandle()
{
return this->fsErrorHandle_;
}
bool ProcessImpl::Start()
{
if (this->process_ != INVALID_HANDLE_VALUE)

View File

@ -35,6 +35,8 @@ namespace Aurora::Processes
AuSPtr<IO::IAsyncTransaction> NewAsyncTransaction() override;
AuSPtr<IO::IAsyncTransaction> NewErrorStreamAsyncTransaction() override;
AuSPtr<IO::IIOHandle> GetOutputAndInputHandles() override;
AuSPtr<IO::IIOHandle> GetErrorStreamHandle() override;
bool Start() override;

View File

@ -471,6 +471,16 @@ namespace Aurora::Processes
return this->fsErrorStream_ ? this->fsErrorStream_->NewTransaction() : AuSPtr<AuIO::IAsyncTransaction> {};
}
AuSPtr<IO::IIOHandle> ProcessImpl::GetOutputAndInputHandles()
{
return this->fsHandle_;
}
AuSPtr<IO::IIOHandle> ProcessImpl::GetErrorStreamHandle()
{
return this->fsErrorHandle_;
}
void ProcessImpl::ForkMain()
{
{

View File

@ -46,6 +46,8 @@ namespace Aurora::Processes
AuSPtr<IO::IAsyncTransaction> NewAsyncTransaction() override;
AuSPtr<IO::IAsyncTransaction> NewErrorStreamAsyncTransaction() override;
AuSPtr<IO::IIOHandle> GetOutputAndInputHandles() override;
AuSPtr<IO::IIOHandle> GetErrorStreamHandle() override;
bool Start() override;