Replies: 2 comments 2 replies
-
I haven't confirmed it, but from your description, it looks like a bug to me. |
Beta Was this translation helpful? Give feedback.
1 reply
-
I am experiencing the same, @kittaakos did you find a solution? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there; when I quit a Theia-based electron app, or the Theia electron example started from sources by closing the last window with the
X
, theBackendApplication#onStop
is not always called. When the electron app runs in cluster mode, and the Theia backend is forked from the electron main,onStop
is not called from the electron app. When--no-cluster
arg is set, it works.When the backend app process stops, it stops the contributions. This is the happy path, and it works fine if
--no-cluster
is set:theia/packages/core/src/node/backend-application.ts
Line 177 in b28c8b9
But in a bundled app, the backend process is forked from the electron main. The electron app kills the backend process on quit with the default
'SIGTERM'
signal:theia/packages/core/src/electron-main/electron-main-application.ts
Line 499 in b28c8b9
Currently, the backend app does not do any cleanup on
'SIGTERM'
:theia/packages/core/src/node/backend-application.ts
Line 181 in b28c8b9
theia/packages/core/src/node/backend-application.ts
Lines 173 to 175 in b28c8b9
For example, I want to delete a file on quit synchronously, but it does not work because the backend contributions are not stopped.
theia/packages/core/src/node/backend-application.ts
Lines 91 to 97 in b28c8b9
Has somebody experienced the same? Is it a bug, or am I doing something wrong? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions