kill subprocess when exit