Wrote code for using kill command. Not tested.