kill Terminal

kill terminal after parent writes to a file