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

DevTools processes may not be terminated correctly at shutdown #1511

Closed
3 of 5 tasks
DanTup opened this issue Mar 7, 2019 · 1 comment
Closed
3 of 5 tasks

DevTools processes may not be terminated correctly at shutdown #1511

DanTup opened this issue Mar 7, 2019 · 1 comment
Labels
blocked on dart / flutter Requires a change in Dart or Flutter to progress in commands Relates to commands (usually invoked from the command Palette) is bug
Milestone

Comments

@DanTup
Copy link
Member

DanTup commented Mar 7, 2019

The process ID is different - this is likely because it's the shell (we use shellExecute) or pub is spawning dart.exe.

(PROC 7152) Spawned /home/travis/build/Dart-Code/Dart-Code/with spaces/dart-sdk/bin/pub global run devtools --machine --port 0
(PROC 7152) {"method":"server.started","params":{"host":"127.0.0.1","port":37077}}
(PROC 7152) Calling kill()
(PROC 7152) Exited with code null
Waiting 10 secs before dumping processes...
(Test end): 7153 (1): dart: /home/travis/build/Dart-Code/Dart-Code/with spaces/dart-sdk/bin/dart /home/travis/build/Dart-Code/Dart-Code/with spaces/dart-sdk/bin/snapshots/pub.dart.snapshot global run devtools --machine --port 0

Opened flutter/devtools#402 to expose the real PID, as we do for other processes.

  • Land fix in DevTools
  • Wait for DevTools release
  • Update minimum required version
  • Fix this to use PID
  • Revert 77271d6
@DanTup DanTup added is bug blocked on dart / flutter Requires a change in Dart or Flutter to progress in commands Relates to commands (usually invoked from the command Palette) labels Mar 7, 2019
@DanTup DanTup added this to the v2.25.0 milestone Mar 7, 2019
@DanTup
Copy link
Member Author

DanTup commented Mar 7, 2019

Turns out NodeJS actually calls this out in the docs (we use shellExecute because on Windows that's the only way to launch a .bat).

On Linux, child processes of child processes will not be terminated when attempting to kill their parent. This is likely to happen when running a new process in a shell or with the use of the shell option of ChildProcess

DanTup added a commit that referenced this issue Mar 7, 2019
To be reverted when #1511 is fixed.
DanTup added a commit that referenced this issue Mar 11, 2019
DanTup added a commit that referenced this issue Mar 11, 2019
DanTup added a commit that referenced this issue Mar 12, 2019
DanTup added a commit that referenced this issue Mar 12, 2019
DanTup added a commit that referenced this issue Mar 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked on dart / flutter Requires a change in Dart or Flutter to progress in commands Relates to commands (usually invoked from the command Palette) is bug
Projects
None yet
Development

No branches or pull requests

1 participant