mirror of
https://github.com/NixOS/nix
synced 2025-06-29 19:03:16 +02:00
Use vfork() instead of fork() if available
Hopefully this reduces the chance of hitting ‘unable to fork: Cannot allocate memory’ errors. vfork() is used for everything except starting builders.
This commit is contained in:
parent
48c19c4633
commit
ea89df2b76
6 changed files with 51 additions and 22 deletions
|
@ -266,6 +266,9 @@ void closeOnExec(int fd);
|
|||
sanitize file handles 0, 1 and 2. */
|
||||
void setuidCleanup();
|
||||
|
||||
/* Call vfork() if available, otherwise fork(). */
|
||||
extern pid_t (*maybeVfork)();
|
||||
|
||||
|
||||
/* User interruption. */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue