Merge pull request #2642 from deepak1556/app_api_patch
process: api to set file descriptor soft limit
This commit is contained in:
		
				commit
				
					
						b205bd381e
					
				
			
		
					 3 changed files with 11 additions and 1 deletions
				
			
		| 
						 | 
					@ -11,6 +11,7 @@
 | 
				
			||||||
#include "atom/common/chrome_version.h"
 | 
					#include "atom/common/chrome_version.h"
 | 
				
			||||||
#include "atom/common/native_mate_converters/string16_converter.h"
 | 
					#include "atom/common/native_mate_converters/string16_converter.h"
 | 
				
			||||||
#include "base/logging.h"
 | 
					#include "base/logging.h"
 | 
				
			||||||
 | 
					#include "base/process/process_metrics.h"
 | 
				
			||||||
#include "native_mate/dictionary.h"
 | 
					#include "native_mate/dictionary.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "atom/common/node_includes.h"
 | 
					#include "atom/common/node_includes.h"
 | 
				
			||||||
| 
						 | 
					@ -61,6 +62,9 @@ void AtomBindings::BindTo(v8::Isolate* isolate,
 | 
				
			||||||
  dict.SetMethod("crash", &Crash);
 | 
					  dict.SetMethod("crash", &Crash);
 | 
				
			||||||
  dict.SetMethod("hang", &Hang);
 | 
					  dict.SetMethod("hang", &Hang);
 | 
				
			||||||
  dict.SetMethod("log", &Log);
 | 
					  dict.SetMethod("log", &Log);
 | 
				
			||||||
 | 
					#if defined(OS_POSIX)
 | 
				
			||||||
 | 
					  dict.SetMethod("setFdLimit", &base::SetFdLimit);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
  dict.SetMethod("activateUvLoop",
 | 
					  dict.SetMethod("activateUvLoop",
 | 
				
			||||||
      base::Bind(&AtomBindings::ActivateUVLoop, base::Unretained(this)));
 | 
					      base::Bind(&AtomBindings::ActivateUVLoop, base::Unretained(this)));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -269,7 +269,6 @@ Adds `tasks` to the [Tasks][tasks] category of the JumpList on Windows.
 | 
				
			||||||
  consists of two or more icons, set this value to identify the icon. If an
 | 
					  consists of two or more icons, set this value to identify the icon. If an
 | 
				
			||||||
  icon file consists of one icon, this value is 0.
 | 
					  icon file consists of one icon, this value is 0.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
### `app.commandLine.appendSwitch(switch[, value])`
 | 
					### `app.commandLine.appendSwitch(switch[, value])`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Append a switch (with optional `value`) to Chromium's command line.
 | 
					Append a switch (with optional `value`) to Chromium's command line.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,3 +11,10 @@ upstream node:
 | 
				
			||||||
## process.hang
 | 
					## process.hang
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Causes the main thread of the current process hang.
 | 
					Causes the main thread of the current process hang.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## process.setFdLimit(maxDescriptors) _OS X_ _Linux_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* `maxDescriptors` Integer
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Sets the file descriptor soft limit to `maxDescriptors` or the OS hard
 | 
				
			||||||
 | 
					limit, whichever is lower for the current process.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue