Skip to content

Instantly share code, notes, and snippets.

Avatar

Ben Noordhuis bnoordhuis

View GitHub Profile
View strace.out
This file has been truncated, but you can view the full file.
[root@server ~]# strace -fp 5497
Process 5497 attached with 2 threads - interrupt to quit
[pid 5498] futex(0x7fa1b80008c8, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 5497] epoll_wait(5, {{EPOLLIN, {u32=10, u64=10}}}, 1024, 4294967295) = 1
[pid 5497] accept4(10, 0, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK) = 11
[pid 5497] futex(0x7fa1b80008c8, FUTEX_WAKE_PRIVATE, 1) = 1
[pid 5498] <... futex resumed> ) = 0
[pid 5498] nanosleep({0, 900000}, NULL) = 0
[pid 5498] futex(0x7fa1b80008c8, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
View test-tcp-dont-connect-after-write.c
/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
@bnoordhuis
bnoordhuis / deamontest.js
Created Feb 5, 2012 — forked from AndreasMadsen/deamontest.js
Frist draft on a simple javascript deamon
View deamontest.js
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'], {
View 0001-Potential-fix-for-2438.patch
From 61dbe66f45a86d5519bf25e403caf34f60ad9dd8 Mon Sep 17 00:00:00 2001
From: Ryan Dahl <ry@tinyclouds.org>
Date: Thu, 29 Dec 2011 16:06:14 -0800
Subject: [PATCH] Potential fix for #2438
---
src/node_http_parser.cc | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc
View benchmark.txt
### cluster - /bytes/1024
log2.xml , 38578.2, 0.0, 1213, 0.0, 0
### cluster - /bytes/10240
log3.xml , 14598.6, 0.0, 10878, 0.0, 0
### cluster - /bytes/102400
View test-http-server-pause.js
common = require("../common");
assert = require("assert");
net = require("net");
http = require("http");
var serverResponse = "";
var clientGotEOF = false;
server = http.createServer(function (req, res) {
console.log('server req');