Use posix_spawn to run the pager
In low memory environments, "nix-env -qa" failed because the fork to run the pager hit the kernel's overcommit limits. Using posix_spawn gets around this. (Actually, you have to use posix_spawn with the undocumented POSIX_SPAWN_USEVFORK flag, otherwise it just uses fork/exec...)
This commit is contained in:
		
							parent
							
								
									d51eed833a
								
							
						
					
					
						commit
						d34d2b2bbf
					
				
					 3 changed files with 39 additions and 10 deletions
				
			
		|  | @ -45,8 +45,14 @@ BaseError & BaseError::addPrefix(const FormatOrString & fs) | |||
| 
 | ||||
| 
 | ||||
| SysError::SysError(const FormatOrString & fs) | ||||
|     : Error(format("%1%: %2%") % fs.s % strerror(errno)) | ||||
|     , errNo(errno) | ||||
|     : SysError(errno, fs) | ||||
| { | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| SysError::SysError(int errNo, const FormatOrString & fs) | ||||
|     : Error(format("%1%: %2%") % fs.s % strerror(errNo)) | ||||
|     , errNo(errNo) | ||||
| { | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue