Handle SIGINT/SIGTERM gracefully

1. Terminate child procs
2. Return a JSON result to stdout