You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
467 B

const common = require('../common');
const assert = require('assert');
const net = require('net');
const fs = require('fs');
process.stdout.write('hello world\r\n');
var stdin = process.openStdin();
stdin.on('data', function(data) {
process.stdout.write(data.toString());
});
stdin.on('end', function() {
// If stdin's fd was closed, the next open() call would return 0.
var fd = fs.openSync(process.argv[1], 'r');
assert(fd > 2);
fs.closeSync(fd);
});