This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source: http://code.google.com/p/gflot/source/browse/trunk/flot/base64.js?r=153 | |
/* Copyright (C) 1999 Masanao Izumo <[email protected]> | |
* Version: 1.0 | |
* LastModified: Dec 25 1999 | |
* This library is free. You can redistribute it and/or modify it. | |
*/ | |
/* | |
* Interfaces: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var net = require('net'); | |
var immortal = require('immortal'); | |
var spawn = function(id, callback) { | |
var socket = net.connect('/tmp/monitor.sock'); | |
console.log(id, 'start'); | |
socket.on('error', function(error) { | |
if (error.code !== 'ENOENT') throw error; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Andreass-MacBook-Pro:node Andreas$ make test | |
make -C out BUILDTYPE=Release | |
make[1]: Nothing to be done for `all'. | |
ln -fs out/Release/node node | |
python tools/test.py --mode=release simple message | |
=== release test-http-full-response === | |
Path: simple/test-http-full-response | |
assert.js:104 | |
throw new assert.AssertionError({ | |
^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
andreas@ubuntu:~/GitHub/node$ make test | |
make -C out BUILDTYPE=Release | |
make[1]: Entering directory `/home/andreas/GitHub/node/out' | |
make[1]: Nothing to be done for `all'. | |
make[1]: Leaving directory `/home/andreas/GitHub/node/out' | |
ln -fs out/Release/node node | |
python tools/test.py --mode=release simple message | |
=== release test-eio-race === | |
Path: simple/test-eio-race | |
trying to kill event loop ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
http.createServer(function (req, res) { | |
req.pause(); | |
var newReq = modifyRequest(req); | |
var proxy_req = http.request(newReq, function (proxy_res) { | |
req.resume(); | |
req.pipe(proxy_req); //we miss trailer headers here | |
proxy_res.pipe(res); //we miss all headers here | |
}); | |
}).listen(80, "127.0.0.1"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ SIGUSR2: { died: true, message: 'exit emitted' }, | |
SIGUSR1: { died: false, message: 'not emitted' }, | |
SIGINFO: | |
{ died: false, | |
message: 'signal not supported' }, | |
SIGWINCH: { died: false, message: 'not emitted' }, | |
SIGPROF: { died: true, message: 'exit emitted' }, | |
SIGVTALRM: { died: true, message: 'exit emitted' }, | |
SIGXFSZ: { died: true, message: 'exit emitted' }, | |
SIGXCPU: { died: true, message: 'exit emitted' }, |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2307 execve("/usr/local/bin/node", ["node", "child/deamon.js"], [/* 21 vars */]) = 0 | |
2307 brk(0) = 0x1a7f000 | |
2307 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
2307 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f22f81f9000 | |
2307 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
2307 open("/etc/ld.so.cache", O_RDONLY) = 3 | |
2307 fstat(3, {st_mode=S_IFREG|0644, st_size=58473, ...}) = 0 | |
2307 mmap(NULL, 58473, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f22f81ea000 | |
2307 close(3) = 0 | |
2307 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Andreass-MacBook-Pro:node Andreas$ sudo dtruss -f node child/deamon.js | |
Password: | |
head: 480 | |
PID/THRD SYSCALL(args) = return | |
480/0x3bbd: getpid(0x0, 0x0, 0x0) = 480 0 | |
480/0x3bbd: __sysctl(0xC00077AC, 0x3, 0xC00077A8) = 0 0 | |
480/0x3bbd: issetugid(0xC00077AC, 0x3, 0xC00077A8) = 0 0 | |
480/0x3bbd: csops(0x0, 0x0, 0xC000781C) = 0 0 | |
480/0x3bbd: shared_region_check_np(0xC00057A0, 0x0, 0xC000781C) = 0 0 | |
480/0x3bbd: stat64("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0xC00069F0, 0xC000781C) = 0 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Andreass-MacBook-Pro:node Andreas$ sudo dtruss node child/deamon.js | |
head: 7880 | |
SYSCALL(args) = return | |
getpid(0x0, 0x0, 0x0) = 7880 0 | |
__sysctl(0xC00387AC, 0x3, 0xC00387A8) = 0 0 | |
issetugid(0xC00387AC, 0x3, 0xC00387A8) = 0 0 | |
csops(0x0, 0x0, 0xC003881C) = 0 0 | |
shared_region_check_np(0xC00367A0, 0x0, 0xC003881C) = 0 0 | |
stat64("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0xC00379F0, 0xC003881C) = 0 0 | |
open("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x0, 0x0) = 3 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var child_process = require('child_process'); | |
function startDeamon(child, args) { | |
var newEnv = JSON.parse(JSON.stringify(process.env)); | |
newEnv.deamonOptions = JSON.stringify({exec: child, args: args}); | |
var deamonWatcher = child_process.fork(process.argv[1], ['deamon'], { |