I am pretty sure this can't work. Did you try it on spidermonkey, v8, jsc and node?

You are defining read as a local variable, so it covers the native `read()` some shells have.