Skip to content

Instantly share code, notes, and snippets.

View piscisaureus's full-sized avatar
🦕

Bert Belder piscisaureus

🦕
View GitHub Profile
Warning: Missing input file deps\v8\tools\gyp\..\..\src\src\list-inl.h pwd=D:\node4
{ 'target_defaults': { 'cflags': [],
'default_configuration': 'Debug',
'defines': [],
'include_dirs': [],
'libraries': []},
'variables': { 'host_arch': 'ia32',
'node_install_npm': 'true',
'node_install_waf': 'true',
'node_prefix': '',
uv_pipe_t pipe1, *pipe2;
// pipe2 is the pipe end that the parent process will use
pipe2 = malloc(sizeof *pipe2)
// PIPE_SPAWN_SAFE creates a pipe that is safe for using with
// uv_spawn(). When the flag is not used, spawn() will not reject
// the pipe end but the child process may not be able to use it.
uv_pipe_init2(&pipe1, PIPE_SPAWN_SAFE | PIPE_READABLE);
uv_pipe_init2(pipe2, PIPE_WRITEABLE);
uv_pipe_t pipe1, pipe2;
// PIPE_SPAWN_SAFE creates a pipe that is safe for using with
// uv_spawn(). When the flag is not used, spawn() will not reject
// the pipe end but the child process may not be able to use it.
uv_pipe_init2(&pipe1, PIPE_SPAWN_SAFE | PIPE_READABLE);
uv_pipe_init2(&pipe2, PIPE_SPAWN_SAFE | PIPE_WRITEABLE);
uv_pipe_link(&pipe1, &pipe2); // Connects 2 unconnected pipes together
From 0699f5bfb40ca365f46eab775c7e6fc8a19d3eee Mon Sep 17 00:00:00 2001
From: Bert Belder <[email protected]>
Date: Mon, 4 Jun 2012 14:04:15 +0200
Subject: [PATCH 1/1] Improve child process stdio documentation
---
doc/api/child_process.markdown | 41 ++++++++++++++++++++++++----------------
1 file changed, 25 insertions(+), 16 deletions(-)
diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown
var assert = require('assert'),
net = require('net'),
connections = 0;
var server = http.createServer(function(req, res) {
if (++conns == 2)
server.close()
setTimeout(function() {
res.writeHead(200, {
(function() {
function seti(v) {
i = v;
}
seti(1); // Mutates global.i
console.log(global.i);
eval('var i;');
seti(42); // Mutates local variable i
console.log(global.i, i);
function timeout() {
console.log("timeout");
process.nextTick(function() {
console.log("nexttick set by timer");
});
}
function tick() {
for (var i = 0; i < 1e6; i++) {}
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtJQPjUipy8uAIOeHDtuqG+emxo1/NO701w7vMy99w5djTDlCO918UfIjC499p98UHEHQnM0Y9FzAg+cDOoBFWpjxpraZMwXiLkEdL8qJpoyWYUcgebbQ3X9Hgd/ZtSEFmbBKU0t8fgtqUf6Dsa7ktJsAKTLYIUxY8d61Iga0j6AEK8dPscl4fBBn/HV4KI7dlz9kOSgfFfxM5FBy0PeEyvNk6yqYQC21Ia7JaO5aKk8WwDPa6Q5fD3G0byRqUeibL50mIy2xFwPq7JZqpeOFCeF5pdGLDLOaa+1qHT+uVR9GyLsvbSOuv9B9NgsZY3rCtwrwt4clkW4d7ZYLB10DoQ== bert@bert-laptop
bert@piscisaureus-mint ~/libuv $ ./gyp_uv
['/home/bert/libuv/uv.gyp', '-I', '/home/bert/libuv/common.gypi', '--depth=.', '--generator-output', '/home/bert/libuv/out', '-Goutput_dir=/home/bert/libuv/out', '-f', 'make', '-Dtarget_arch=ia32', '-Dcomponent=static_library', '-Dlibrary=static_library']
static library /home/bert/libuv/uv.gyp:uv#target has several files with the same basename:
core: src/unix/core.c src/unix/linux/core.c
Some build systems, e.g. MSVC08, cannot handle that.
Traceback (most recent call last):
File "./gyp_uv", line 64, in <module>
run_gyp(gyp_args)
File "./gyp_uv", line 22, in run_gyp
rc = gyp.main(args)
From 04b4c8182f598b9c1b1d9cf31a547d3adc860ae1 Mon Sep 17 00:00:00 2001
From: Bert Belder <[email protected]>
Date: Thu, 10 May 2012 16:08:36 +0200
Subject: [PATCH 1/1] Accept backoff
---
deps/uv/include/uv-private/uv-unix.h | 4 +++-
deps/uv/include/uv.h | 15 +++++++++++++--
deps/uv/src/unix/internal.h | 3 ++-
deps/uv/src/unix/stream.c | 24 +++++++++++++++++++++++-