Change kill signal so grandchildren processes end.

Brought up in issue #1119. This fixes the problem of the lingering process, but is a bit hacky. Thoughts?