Add process.abort
This commit is contained in:
parent
b3a7de15b7
commit
2240486d3d
@ -145,6 +145,11 @@ Example:
|
|||||||
/usr/local/bin/node
|
/usr/local/bin/node
|
||||||
|
|
||||||
|
|
||||||
|
### process.abort()
|
||||||
|
|
||||||
|
This causes node to emit an abort. This will cause node to exit and
|
||||||
|
generate a core file.
|
||||||
|
|
||||||
### process.chdir(directory)
|
### process.chdir(directory)
|
||||||
|
|
||||||
Changes the current working directory of the process or throws an exception if that fails.
|
Changes the current working directory of the process or throws an exception if that fails.
|
||||||
|
@ -1199,6 +1199,11 @@ Local<Value> ExecuteString(Handle<String> source, Handle<Value> filename) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static Handle<Value> Abort(const Arguments& args) {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static Handle<Value> Chdir(const Arguments& args) {
|
static Handle<Value> Chdir(const Arguments& args) {
|
||||||
HandleScope scope;
|
HandleScope scope;
|
||||||
|
|
||||||
@ -2059,6 +2064,7 @@ Handle<Object> SetupProcessObject(int argc, char *argv[]) {
|
|||||||
// define various internal methods
|
// define various internal methods
|
||||||
NODE_SET_METHOD(process, "_needTickCallback", NeedTickCallback);
|
NODE_SET_METHOD(process, "_needTickCallback", NeedTickCallback);
|
||||||
NODE_SET_METHOD(process, "reallyExit", Exit);
|
NODE_SET_METHOD(process, "reallyExit", Exit);
|
||||||
|
NODE_SET_METHOD(process, "abort", Abort);
|
||||||
NODE_SET_METHOD(process, "chdir", Chdir);
|
NODE_SET_METHOD(process, "chdir", Chdir);
|
||||||
NODE_SET_METHOD(process, "cwd", Cwd);
|
NODE_SET_METHOD(process, "cwd", Cwd);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user