netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Stopping CppLite build does not kill compiler processes

Open bbfgelman1 opened this issue 1 year ago • 0 comments

Apache NetBeans version

Apache NetBeans 20

What happened

Stopping a build using the stop button on the "Output" pane does not kill all the compiler processes.

The expected behavior of doing this during a long-running build is to kill the build tool (Ninja) as well as its child processes (GCC), or to at least kill the build tool in such a way that it is able to interrupt and clean up all the compilers.

The actual behavior is that the child processes are not killed. All compilers running at the moment the build is stopped keep running. But they appear to be reparented to the init process (systemd).

Language / Project Type / NetBeans Component

C++ CppLite project

How to reproduce

Create a C++ program with many .cpp files that each take a long time to compile, and that uses CMake.

Run CMake and tell it to use Ninja:

cmake -S . -B build_dir -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

Add this as a new project to Netbeans using the Lightweight C/C++ Project type.

Set the build command to invoke Ninja directly:

ninja -C build_dir

Start a build. Open a tool like htop in a terminal.

Press the "Stop" button on the "Output" pane.

Notice how all the gcc/g++ processes are still running.

Did this work correctly in an earlier version?

No / Don't know

Operating System

RHEL7 AMD64

JDK

jre-11-openjdk-11.0.22.0.7-1.el7_9.x86_64

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

This happens every time.

It used to work correctly with Netbeans 8.2.

Are you willing to submit a pull request?

No

bbfgelman1 avatar Feb 13 '24 18:02 bbfgelman1