[CMake] CMake GUI "Stop" button does not halt exec_process

Hendrik Sattler post at hendrik-sattler.de
Fri Jan 11 10:58:21 EST 2019


Hi,

killing everything might be problematic in some cases: MSVC uses some shared processes to write PDB files. Killing that will make an unrelated other build fail. That was real fun to find out when Jenkins was cleaning up. So kill your children but don't be too pedantic.

HS


Am 11. Januar 2019 10:43:05 MEZ schrieb Chris Wilson <chris+cmake at qwirx.com>:
>In case it helps, Box Backup uses Windows Job Objects
><https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-createjobobjecta>
>to
>ensure that any daemons started during a test will automatically be
>killed
>when the test process exits (if not stopped cleanly beforehand):
>
>https://github.com/boxbackup/boxbackup/blob/s3_support/infrastructure/buildenv-testmain-template.cpp#L367
>
>On Linux you can use prctl(PR_SET_PDEATHSIG, SIGKILL) in the child
>process
>(between fork() and exec()) to achieve this.
>
>On Thu, 10 Jan 2019 at 22:17, Person Withhats
><personwithhats2 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.....>.<
>>
>> Let me know any suggestions or possible fixes
>> --
>>
>> Powered by www.kitware.com
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Kitware offers various services to support the CMake community. For
>more
>> information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> https://cmake.org/mailman/listinfo/cmake
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190111/8850453e/attachment.html>


More information about the CMake mailing list