Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension process remains running when parent process terminates #1242

Open
AddictArts opened this issue Apr 8, 2024 · 2 comments
Open

Extension process remains running when parent process terminates #1242

AddictArts opened this issue Apr 8, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@AddictArts
Copy link

Describe the bug
The docs indicate here https://neutralino.js.org/docs/how-to/extensions-overview/ to exit the process when the socket is closed; However, adding or ensuring process.exit() is called does not change the child process behavior. The child extension process remains running, orphaned.

To Reproduce
Steps to reproduce the behavior:

  1. Run the sample extension with fix to path \\ double backslash.
  2. Close the webview2 window.
  3. Node process still running.

Expected behavior
Child dies

Specifications
Windows 11
Neu 5.1.0

@AddictArts AddictArts added the bug Something isn't working label Apr 8, 2024
@AddictArts
Copy link
Author

FYI: Procs below is a rust replacement for ps

The node.exe process does linger and is orphaned. See the proc output below. You can see neutralino-win_x64.exe spawns the process 33620, then I kill / exit / close, the neutralino-win_x64.exe process and the node process remains running. And I know it is the child by pid and cli args.

❯ procs -t -i ppid node
             PID   User   │ CPU MEM CPU Time Parent PID │ Command
                          │ [%] [%]                     │
 └┬───────── 16312 E26368 │ 0.0 0.1 00:02:06       6912 │ sihost.exe
  └┬──────── 26096 E26368 │ 0.0 0.2 00:04:19      16312 │ WindowsTerminal.exe
   └┬─────── 72960 E26368 │ 0.0 0.2 00:00:15      26096 │ pwsh.exe
    └┬────── 69136 E26368 │ 0.0 0.1 00:00:00      72960 │ node.exe
     └┬───── 58072 E26368 │ 0.0 0.0 00:00:00      69136 │ neutralino-win_x64.exe
      ├┬──── 11908 E26368 │ 0.0 0.2 00:00:00      58072 │ msedgewebview2.exe
      │├──── 43892 E26368 │ 0.0 0.0 00:00:00      11908 │ msedgewebview2.exe
      │├──── 71760 E26368 │ 0.0 0.1 00:00:00      11908 │ msedgewebview2.exe
      │├──── 76568 E26368 │ 0.0 0.2 00:00:00      11908 │ msedgewebview2.exe
      │├──── 78764 E26368 │ 0.0 0.0 00:00:00      11908 │ msedgewebview2.exe
      │├──── 80080 E26368 │ 0.0 0.0 00:00:00      11908 │ msedgewebview2.exe
      │├──── 81032 E26368 │ 0.0 0.2 00:00:00      11908 │ msedgewebview2.exe
      │└──── 84316 E26368 │ 0.0 0.0 00:00:00      11908 │ msedgewebview2.exe
      └┬──── 33620 E26368 │ 0.0 0.0 00:00:00      58072 │ cmd.exe
       ├──── 24616 E26368 │ 0.0 0.1 00:00:00      33620 │ node.exe
       └──── 38032 E26368 │ 0.0 0.0 00:00:00      33620 │ conhost.exe

# Close the app, kill it, node proc still remains

❯ procs -t -i ppid node
        PID   User   │ CPU MEM CPU Time Parent PID │ Command
                     │ [%] [%]                     │
 └┬──── 33620 E26368 │ 0.0 0.0 00:00:00      58072 │ cmd.exe
  └──── 24616 E26368 │ 0.0 0.1 00:00:00      33620 │ node.exe

@AntumDeluge
Copy link

My project is having the same issue with our Windows app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants