hookio/hook.io — pull request #179 by richtera (2012-03-29 23:41:25+00:00)
Title: Check if we're a worker in a node cluster (as per require('cluster').isWorker) before listening on STDIN

Listening on STDIN when hook.io is being used within a worker of a cluster causes a deadlock. Probably because the cluster itself uses STDIN and there is a conflict. Checking for isWorker is being done within a try/catch to make sure this works in versions of node where cluster is not available. There is an open source "cluster" npm module which might provide enough of an interface to also disable STDIN listening but this was not specifically tested.