mirror of
https://github.com/NixOS/nix
synced 2025-06-27 12:41:15 +02:00
Totally exclude nix::setStackSize on Windows
This commit is contained in:
parent
b644e5750e
commit
7c8c71f8e9
3 changed files with 7 additions and 2 deletions
|
@ -51,11 +51,11 @@ unsigned int getMaxCPU()
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef _WIN32
|
||||
size_t savedStackSize = 0;
|
||||
|
||||
void setStackSize(size_t stackSize)
|
||||
{
|
||||
#ifndef _WIN32
|
||||
struct rlimit limit;
|
||||
if (getrlimit(RLIMIT_STACK, &limit) == 0 && limit.rlim_cur < stackSize) {
|
||||
savedStackSize = limit.rlim_cur;
|
||||
|
@ -73,8 +73,8 @@ void setStackSize(size_t stackSize)
|
|||
);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void restoreProcessContext(bool restoreMounts)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue