[Qt-creator] QT Creator 2.4.0 feature request
Christian Kandeler
christian.kandeler at nokia.com
Fri Dec 16 10:56:59 CET 2011
On 15/12/11 22:51, ext Uwe Fechner wrote:
> I tested it, and I have the impression, that SIGTERM is either not tried
> at all, or the time delay between SIGTERM and SIGKILL is very small
> (smaller than three seconds).
> Our application needs up to three seconds, to write the log file buffer
> to the (slow) flash memory.
>
> How long is the delay currently?
>
> If it is too short for us, would it be possible to add an option to
> change this delay in the next release?
The whole stop mechanism is a bit of a mess. Ideally, I would like to do
something like this:
kill -SIGTERM $PID || kill -SIGKILL $PID
However, the kill command is not completely synchronous in that it does
not check whether the process does actually exit. So if your application
does this:
signal(SIGTERM, SIGN_IGN);
then the above command line will return success, but the process will
happily keep running.
So my proposal would be to only call the kill command once, but let the
user choose between SIGTERM and SIGKILL in the run configuration (or
perhaps offer all signals?). I would then also change the current
behavior of blindly assuming that the process has exited after the kill
command and instead wait for the process before reporting the run
control as finished. In case a process really hangs, the user would have
to close the run control via the "x" button.
Sound sensible?
Christian
More information about the Qt-creator
mailing list