Some fixes

- Fix : Mac ping command
- Use 'close' event instead of 'exit' event for process spawning