[cmake-developers] CMake GUI "Stop" button does not halt exec_process

Venedict Tchistopolskii venytch at gmail.com
Wed Jan 16 16:09:32 EST 2019


That'd be great if it could be implemented. Is there any way to incorporate
that functionality into a custom CMake build?

I don't know the process to generate a custom CMake GUI exe, any resources
available on that>?

On Wed, Jan 16, 2019 at 12:52 PM frodak17 <frodak17 at gmail.com> wrote:

>
>
> On Wed, Jan 16, 2019 at 3:27 PM Venedict Tchistopolskii <venytch at gmail.com>
> wrote:
>
>> Pressing "STOP" in the CMake GUI interface halts CMake itself but does
>> not stop any execute_process that is going on at the time. This makes it
>> hang until the process finishes, since no interrupt is sent......
>>
>> Aggravating when you're using an exterior script (e.g. a .exe or .py)
>> that e.g. handles package maintenance. Would hang up for the entire
>> duration of ~40 minutes unless you force kill that sub process.
>>
>> I think force-killing CMake GUI also won't forward the kill to the
>> exec_process, orphaning it.....>.<
>>
>> My reproduction:
>> Windows 10
>> CMake script via CMakeLists.txt files
>> Executing a Python script PyInstalled into a .exe for windows use ->
>> Downloads and untars some SDK's and shows progress (plus a bit more) but
>> takes 40-70 minutes average.
>>
>> Canceling CMake won't cancel python script -> 70min hangup or requirement
>> to use task manage and force-kill subprocess.
>>
>> Let me know any suggestions or possible fixes
>> --
>>
>>
> I commented on this about a month ago:
>
>> Looks like this would require a code change how the GUI works and the
>> internal way execute_process works.  Now execute_process knows how to
>> cancel a process due to time out, but it didn't seem to check for anything
>> else.  Essentially it looks like execute_process needs to be signaled by
>> the button press to cancel the process in addition to checking for
>> timeout.  There are other internal interrupt flags that seem to be set when
>> the GUI stop button is pressed.  Anyways this is what I noticed in the
>> code base.
>>
>
> So in the execute_process function it sits in a loop waiting for the
> process to finish.  If the timeout occurs it kills the process.
> At the same time when the GUI stop button is pressed it sets some sort of
> abort flag that is used during command processing to quit processing
> commands.
> It seems that someone should be able to take this abort flag and use it to
> not only stop the command processing loop but to also have the
> execute_process timeout loop to kill the process if the abort flag is set.
>
> Best regards,
> F
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake-developers/attachments/20190116/0f430151/attachment.html>


More information about the cmake-developers mailing list