Skip to content

Instantly share code, notes, and snippets.

@chakrit
Created December 6, 2012 19:43
Show Gist options
  • Save chakrit/4227656 to your computer and use it in GitHub Desktop.
Save chakrit/4227656 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <unistd.h>
const int S2uS = 1000000;
int
main() {
for (int i = 0; i < 5; i++) {
fprintf(stdout, "HELLO - %d\r\n", i);
usleep(1 * S2uS);
}
return 0;
}
{ spawn } = require 'child_process'
child = spawn "./x"
child.stdout.pipe process.stdout
// Generated by CoffeeScript 1.4.0
var child, spawn;
spawn = require('child_process').spawn;
child = spawn("./x");
child.stdout.pipe(process.stdout);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment