Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Add process.abort
  • Loading branch information
rmustacc authored and ry committed Dec 15, 2011
1 parent b3a7de1 commit 2240486
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/api/process.markdown
Expand Up @@ -145,6 +145,11 @@ Example:
/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)

Changes the current working directory of the process or throws an exception if that fails.
Expand Down
6 changes: 6 additions & 0 deletions src/node.cc
Expand Up @@ -1199,6 +1199,11 @@ Local<Value> ExecuteString(Handle<String> source, Handle<Value> filename) {
}


static Handle<Value> Abort(const Arguments& args) {
abort();

This comment has been minimized.

Copy link
@igorzi

igorzi Dec 16, 2011

this doesn't compile. The function needs to return a value.

}


static Handle<Value> Chdir(const Arguments& args) {
HandleScope scope;

Expand Down Expand Up @@ -2059,6 +2064,7 @@ Handle<Object> SetupProcessObject(int argc, char *argv[]) {
// define various internal methods
NODE_SET_METHOD(process, "_needTickCallback", NeedTickCallback);
NODE_SET_METHOD(process, "reallyExit", Exit);
NODE_SET_METHOD(process, "abort", Abort);
NODE_SET_METHOD(process, "chdir", Chdir);
NODE_SET_METHOD(process, "cwd", Cwd);

Expand Down

0 comments on commit 2240486

Please sign in to comment.