Skip to content

Commit

Permalink
Default "working directory" to the script directory (POLS)
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Feb 18, 2011
1 parent 7ede5b1 commit 2ea9e7d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
Below are the settings available:

- `workers` Number of workers to spawn, defaults to the number of CPUs or `1`
- `working directory` Working directory defaulting to `/`
- `working directory` Working directory defaulting to the script's dir
- `backlog` Connection backlog, defaulting to 128
- `socket path` Master socket path defaulting to `./`
- `timeout` Worker shutdown timeout in milliseconds, defaulting to `60000`
Expand Down
4 changes: 2 additions & 2 deletions lib/master.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var node = process.execPath
* Options:
*
* - `workers` Number of workers to spawn, defaults to the number of CPUs
* - 'working directory` Working directory defaulting to '/'
* - 'working directory` Working directory defaulting to the script's dir
* - 'backlog` Connection backlog, defaulting to 128
* - 'socket path` Master socket path defaulting to `./`
* - 'timeout` Worker shutdown timeout in milliseconds, defaulting to 60000
Expand Down Expand Up @@ -93,7 +93,7 @@ var Master = module.exports = function Master(server) {
// defaults
this.options = {
'backlog': 128
, 'working directory': '/'
, 'working directory': this.dir
, 'socket path': this.dir
, 'timeout': 60000
};
Expand Down
1 change: 1 addition & 0 deletions test/test.basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ cluster = cluster(server)
.listen(3000);

cluster.on('listening', function(){
process.cwd().should.include.string('cluster/test');
http.get({ host: 'localhost', port: 3000 }, function(res){
res.on('data', function(chunk){
chunk.toString().should.equal('Hello World');
Expand Down

0 comments on commit 2ea9e7d

Please sign in to comment.