(comint-send-eof)
で終了するようにinteractiveな出糞しる。