title: nodejs exec command failing with no useful error message
body: <p>This is the code to execute</p>
  
  <pre><code>
  
      cp.exec("cc -Wall /tmp/test.c -o /tmp/test", function(e, stdout, stderr) {
          if (e) {
              var errorstr = "Compilation failed with the following error<br/>"+ e.message.toString()
              client.send(errorstr)
              console.log(e, stdout, stderr)
              ee.prototype.removeAllListeners()
          } else if (stderr.length > 0) {
              client.send("Compilion finished with warnings\n"+ stderr + '\n')
              client.send('compiled')
              ee.prototype.emit('compiled')
          } else {
              client.send("Compilation successful")
              ee.prototype.emit('compiled')
          }
      })
  
  </code></pre>
  
  <p>'client' is the argument of socket.io's callback argument. 'ee' is an instance of EventEmitter</p>
  
  <p>Coming to the problem. On running the code, the callback says that the command was unsuccessful. console.log(e, stdout, stderr) is </p>
  
  <pre>{ [Error: Command failed: ] killed: false, code: false, signal: undefined } '' ''</pre>
  
  <p>/tmp/test.c is a valid C code and on checking the directory /tmp , I find that test.c is proper and the binary 'test' <i>is</i> being generated and on running in a shell, is properly executed. So I dont understand why it is flagging unsuccessful execution. The error object's information is unhelpful too. Would appreciate some help/explanation</p>