Hey, I'm looking into an issue with a CMake build on Linux hanging in a select syscall, when using EXECUTE_PROCESS without any additional arguments. The subprocess executed is "chmod". The child finishes and is marked as a zombie, but CMake did not realize that. The only descriptors left open are the one of the signaling pipe.
Looking through the code I couldn't see a place, where I could prove that is directly related to the problem. Nevertheless I have a question about the signal handler used. The function kwsysProcessesSignalHandler in ProcessUnix.c. The problem that I see is the use of a shared variable "kwsysProcesses" in the signal handler. I think the usage of non volatile shared objects should be avoided in signal handlers and we should just do as less as we can in there. So my proposal would be: 1. Use just one SignalPipe for all subprocess 2. In the signal handler just write the one single byte into the w-end of the pipe 3. Do the rest of the processing in the normal workflow. A few more questions: Why do we need the "(void)pipeStatus;" lines. For debugging? Why do we need to read from the pipe in the signal handler? Please let me know what is your opinion. Best wishes Dimitar -- 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: http://public.kitware.com/mailman/listinfo/cmake-developers