Better handling of subprocess killing for shell=True usage.