Why terminal automatically exits?

Why the terminal i opened always automatically exits after 5 minutes? I make a breakpoint in termina-wather.ts, and find it fires the exit event.

I don’t know why, can anybody help?