cri5ti/grunt-shell-spawn — pull request #24 by marco4net (2014-06-03 20:28:01+00:00)
Title: fix bug with watch when restarting tasks

Fixes a problem when shell is used in conjunction with a watch, for example to restart an externally running server with grunt-contrib-watch and tasks: ['shell:server:kill', 'shell:server']

When the server was restarted the second time, it fails with:
Fatal error: No running process for target:server

The handler for the 'close' event also removes the newly started server (timing issue) with the same target name but different PID. Fixed by checking the PID.