Hi George,
if you start the trace server manually on a command-shell, you can do CTRL+C (foreground process) or kill the process. The server has a shutdown hook implemented to catch the shutdown request, which then stops the webserver, disposes the workspace and resources.
As long you don't force kill the process (e.g. Linux kill -9 <pid>), the hook will catch the shutdown.
Using the theia-trace-extension, the server is automatically started when opening a trace or with the "Start trace server" command. For that, you need to configure the path in the preferences under the "Extensions/Trace Viewer". The theia-trace-extension application
will take care of the stopping the server when closing the application.
Please note, that README of the theia-trace-extension is currently being updated to give more details on starting the trace server (PR is not merged yet).
Best Regards
Bernd
From: tracecompass-dev <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of Matthew Khouzam via tracecompass-dev <tracecompass-dev@xxxxxxxxxxx>
Sent: March 21, 2022 11:24 AM
To: tracecompass-dev@xxxxxxxxxxx <tracecompass-dev@xxxxxxxxxxx>
Cc: Matthew Khouzam <matthew.khouzam@xxxxxxxxxxxx>
Subject: Re: [tracecompass-dev] How Trace Server Gracefully Shutsdown
Hi George!
I am finding it funny that this issue comes up, just recently we set it to won't fix thinking nobody would have that usecase. I don't think there's a clean way to do so right now
|
And yet, the "Stop trace server" button is available to click on. Clicking on it writes a the following message: "Failed to stop the trace server on port: 8080.", without furthe...
github.com
|
You could make a killswitch if you want, you will need to call "WebApplication#stop", it's not too hard, but I don't think we have anything in our code base right now. Also, I don't think this should be in the trace server protocol.
I hope this helps!
Matthew
From: tracecompass-dev <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of George Liu <georgeliu220@xxxxxxxxx>
Sent: Monday, March 21, 2022 10:10 AM
To: tracecompass-dev@xxxxxxxxxxx <tracecompass-dev@xxxxxxxxxxx>
Subject: [tracecompass-dev] How Trace Server Gracefully Shutsdown
Hi,
I am currently using Trace Server and starting it manually. I’m wondering what the best method is to gracefully kill all Trace Server processes is. Could I be given some more details on that?
Thanks,
George
|