You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Processes started with bash file flutter/bin/dart do not terminate children processes when killed #98435
which dart on my machine points to path/to/flutter/bin/dart. I was writing a test in DDS and attempting to start a process:
final process = await Process.start('dart', args);
Since dart points to flutter/bin/dart, this actually starts a bash process, not a dart process. Later in my code, I attempted to kill this process: process.kill(); and was checking that other parts of the ecosystem responded accordingly to the process being killed (specifically, I was verifying that DevTools would disconnect). Calling process.kill() killed the bash process, but not any subprocesses that were started by the bash process (i.e. the dart process that DevTools should be responding to). I expect any user who points their Dart to flutter/bin/dart and is trying to spawn a process will hit this issue.
@bkonyi and I spent time debugging this this morning. Please add any additional details or thoughts.
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.
Totally thought I followed up on this, but I guess I didn't. This isn't related to dart-lang/sdk#22470 but is an issue with the wrapper scripts we have around the standalone Dart VM in the Flutter SDK. We should be execing the VM from within those wrappers, but instead we're spawning a child process. It's a rather simple fix IIRC.
Totally thought I followed up on this, but I guess I didn't. This isn't related to dart-lang/sdk#22470 but is an issue with the wrapper scripts we have around the standalone Dart VM in the Flutter SDK. We should be execing the VM from within those wrappers, but instead we're spawning a child process. It's a rather simple fix IIRC.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
maheshj01 commentedon Feb 15, 2022
Hi @kenzieschmoll, Thanks for filing the issue. Would it be possible to share a minimal reproducible code?
This looks related to #98395
github-actions commentedon Mar 8, 2022
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.
christopherfujino commentedon Mar 8, 2022
It looks like this is blocked by dart-lang/sdk#22470
bkonyi commentedon Mar 8, 2022
Totally thought I followed up on this, but I guess I didn't. This isn't related to dart-lang/sdk#22470 but is an issue with the wrapper scripts we have around the standalone Dart VM in the Flutter SDK. We should be
execing the VM from within those wrappers, but instead we're spawning a child process. It's a rather simple fix IIRC.christopherfujino commentedon Mar 8, 2022
Ahh cool
christopherfujino commentedon Mar 8, 2022
@gspencergoog any reason not to call
execfrom our bash entrypoints rather than spawning a subprocess for flutter and dart?gspencergoog commentedon Mar 9, 2022
No, no reason at all. That's the right thing to do.
darshankawar commentedon Mar 9, 2022
Labeling it as applicable based on the discussion / thread above.
christopherfujino commentedon Mar 9, 2022
cool, I can open a PR for that
github-actions commentedon Mar 29, 2022
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.slightfoot commentedon Jun 10, 2022
I can confirm this is still an issue on windows with the batch scripts used.
maheshj01 commentedon Jun 13, 2022
@slightfoot Could you please file that as a separate issue? since this thread has been locked and limited to collaborators only.
christopherfujino commentedon Jun 13, 2022
I agree with @maheshmnj, please file a new issue for that; this issue was specifically for bash entrypoint.