minor change

This commit is contained in:
vrd
2023-10-10 13:59:11 +03:00
parent 105d9e5802
commit 275dc6ddae
3 changed files with 14 additions and 12 deletions
+2 -2
View File
@@ -124,7 +124,7 @@ void PendingCmd::cancel()
execed_ = true;
}
str $(const PendingCmd& cmd)
std::string $(const PendingCmd& cmd)
{
RetProc p = const_cast<PendingCmd&>(cmd).runRedir();
@@ -134,7 +134,7 @@ str $(const PendingCmd& cmd)
ioctl(p.out, FIONREAD, &pipe_size);
// write to the string directly, todo: find a better way
str output;
std::string output;
output.resize(pipe_size);
read(p.out, (char*)output.c_str(), output.size());
return output;