qterminal icon indicating copy to clipboard operation
qterminal copied to clipboard

Extended close confirmation

Open Vladimir-csp opened this issue 9 years ago • 10 comments

Hi! Please extend close confirmation:

Ask confirmation when closing:

  • never
  • always
  • if process is running in terminal

Vladimir-csp avatar Sep 01 '15 04:09 Vladimir-csp

A confirmation should only ever happen if a process is running, so the config item is unnecessary. Is it possible to do?

jleclanche avatar Oct 17 '15 14:10 jleclanche

This is related to #144.

worblehat avatar Oct 19 '15 08:10 worblehat

Not really.

jleclanche avatar Oct 19 '15 10:10 jleclanche

I referred to my comment:

Is there a way to figure if there is a running foreground-process in a tab? We could add an additional confirmation dialog if there is an active process.

If we have a way to figure out if there is a running process, we can create a confirmation dialog that can be used for both issues.

worblehat avatar Oct 19 '15 11:10 worblehat

this is the problem - how to get running process info for various platforms...

pvanek avatar Oct 19 '15 17:10 pvanek

this is the problem - how to get running process info for various platforms...

Sakura has a reliable implementation that works on Linux and FreeBSD.

Also #509 is related. Maybe exit warning option could be made into a checklist:

Warn on exit when:
[ ] child process(es) running
[ ] multiple tabs open
[ ] always

Is 'always' option really needed?

Vladimir-csp avatar Feb 28 '19 11:02 Vladimir-csp

And also the prompt do not show when closing the tabs, the prompt is rised only for the first tab or main window.

mhd-jalilvand avatar May 16 '21 09:05 mhd-jalilvand

I don't use close prompt but if it's useful, it should be shown:

  1. When closing the main window; and
  2. When closing a tab; and
  3. When collapsing sub-terminals.

However, this report is about showing the prompt when a process is running.

tsujan avatar May 16 '21 10:05 tsujan

I have some free time now, let me try to do it

mhd-jalilvand avatar May 16 '21 12:05 mhd-jalilvand

I don't use close prompt but if it's useful, it should be shown:

  1. When closing the main window; and
  2. When closing a tab; and
  3. When collapsing sub-terminals.

However, this report is about showing the prompt when a process is running.

I have change the behavior form so the askOnExit is more configurable but not sure how to check out that a process is running or not. I guess it needs that a qtermwidget issue must be resolved to achievement the goal.

mhd-jalilvand avatar May 21 '21 12:05 mhd-jalilvand