New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prompt about closing window when Close [X] button is pressed #907
Comments
The prompt is only shown if the child shell has invoked further commands. This has not changed with cygwin versions. If you see any specific inconsistent or otherwise undesired behaviour, describe a complete reproducible test case. |
According to "pstree -ap" I have this as example, when I press the [X] key on Cygwin 2+ I always get the complete list of processes, but on Cygwin 3 it's not always showing the processes and exists (I don't know yet if it's about background processes, I just have read on Cygwin's mail list about changing processes to be more Linux like). The $PPID shown on script is 13051: |
A reproducible test case is needed to assess the issue. |
A quick example is here. You can try to press some times the [X] with ESC, and some times the window closes from the first time and other times in some time later. It seems that something crashing in list generation which never happened on older Cygwin versions, which will force me either to Cygwin 2,6 (next 2.x versions has another problem: defunct processes) or to find a way for disabling the [X] button from windows: TESTshell.bat `@echo off SET pExecN=8 TESTshell_exec.sh `#!/bin/sh function funcWaitPexecN { declare -r -a 'DLab1=(L1{'"A..Z"'}{'"1..10"'})' function GenericStatusCheck { function func { for checkmN in ${DLab1[@]} ; do func ; done |
What does "press the [X] with ESC" mean? |
[X] with ESC I mean if the list with running processes is shown you have to press either CANCEL or ESC and retry. There are some random peak points whether the list is not shown and the window closes. The time is the GNU package "time" from Cygwin installation, etherway I have just installed a clean Cygwin x86 installation and I have removed the time from script, the bug still exists. I'll try with more tests and to simplify my test case, for the time something that works: TESTshell.bat SET CYGWIN=nodosfilewarning TESTshell_exec.sh pExecN=8 function funcWaitPexecN { declare -r -a 'DLab1=(L1{'"A..Z"'}{'"1..10"'})' function GenericStatusCheck { function func { for checkmN in ${DLab1[@]} ; do func ; done` |
Reproduced an issue. No need to go through a .bat file, really. And what's your complex script actually doing? Can the issue be produced easier? |
It was a race condition. A detected process (sleep in your case) could have terminated when retrieving its information for display... |
From hta are used variables to bat which calls sh. This script actually is more complex, I just simplified it for showing the problem (that's why there are some more unneeded symbols). Let's say there are 100 computers that I'm sending specific tasks, instead of using one-by-one or all together I'm using in this example 8 computers every time (if 1 computer finished from the queue it's called the 9th, if 2 computers finished are called 9th and 10th, so we have every time 8 computers in queue without the need to wait every 8 computers to finished). |
I have just compiled and tried this commit and works perfectly, thanks |
Released 3.0.3. |
There is a feature "Prompt about running processes on close" but is not always working on Cygwin 3 (it always worked from Cygwin 2,6).
Is it possible to always prompt about closing the window if the X button is pressed?
About ALT+F4 I have used this:
KeyFunctions=d:
echo -n
date``;A+F4:;CA+F12:break;-:"minus"in .minttyrc
The text was updated successfully, but these errors were encountered: