mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-04 19:13:30 +01:00
fixed GH #1204: getdtablesize has been removed on Android 21
This commit is contained in:
parent
6f44a02a65
commit
9d21ddd8ca
@ -201,7 +201,7 @@ ProcessHandleImpl* ProcessImpl::launchByForkExecImpl(const std::string& command,
|
||||
if (outPipe) outPipe->close(Pipe::CLOSE_BOTH);
|
||||
if (errPipe) errPipe->close(Pipe::CLOSE_BOTH);
|
||||
// close all open file descriptors other than stdin, stdout, stderr
|
||||
for (int i = 3; i < getdtablesize(); ++i)
|
||||
for (int i = 3; i < sysconf(_SC_OPEN_MAX); ++i)
|
||||
{
|
||||
close(i);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user