Hello! I am using a QProcess class to create a child process. If this process falls due to any error, then I have to process it accordingly. Actually the question is: is it possible to make it so that when the child process crashes in Windows, the window "The program is terminated ... does not crash. Windows can search for ways to fix this error on the Internet"? The problem is that there may be a lot of child processes, and these messages are not needed by anyone.

    1 answer 1

    Maybe it is better to work on the logic of the processes, so that they would not be terminated by the system by force? Especially if you work in Qt, there work with processes and threads is very easy to implement.

    You can also run multiple processes, but several threads. If you do not work with large amounts of memory, then depending on the number of cores and the presence / absence of processor hyperthreading, one process per physical / logical core is enough and there you can already work with threads that will crash and run again without any problems .

    And yes, in Windows there are no child or parent processes, unlike Unix, in Windows all processes are equivalent, so this is an abstraction of Qt.

    • Ukeo, thanks for the detailed answer, but what you have suggested does not suit me. The fact is that I am writing a system for testing programs on the black box strategy, i.e. I need to test the program, the source code which I do not have. The simplest type of test is to generate input data from a template, start the process and check that everything worked correctly. - Andsimo
    • Well, this is a purely system mechanism, the processor performs an interrupt, it is intercepted by the kernel and then up the chain, to the user. The process itself is no longer involved, it simply ends. Provided that there are no source codes that need to be somehow contrived. Look at the Win32 API, and development with it. If you work on Windows anyway and there is no need for cross-platform, this will give you more tools. PS Although maybe there is some simple way, I do not know. - Ukeo