The reload plugin gets stuck if there's a syntax error. The master can't re-spawn since there's a syntax error, and the reload plugin won't try again, because the restarting flag gets set to true. This fork watches for the master process to exit and then emits an 'exit' event for the master. This way, the reload plugin can watch for the 'exit' event and reset its restarting flag.
The reload plugin gets stuck if there's a syntax error. The master can't re-spawn since there's a syntax error, and the reload plugin won't try again, because the restarting flag gets set to true. This fork watches for the master process to exit and then emits an 'exit' event for the master. This way, the reload plugin can watch for the 'exit' event and reset its restarting flag.