Closed
Description
Reproduction:
- Navigate to any native assets example.
- From the root of the example directory
git clone https://github.com/google/dawn.git
- At the top of the hooks/build.dart build method add.
- If you kill the process with CTRL + C and repeat, you will see many detached processes like cl.exe, msbuild.exe, and cmake.exe start to accumulate, but that may relate to github.com/Child processes remain after parent termination on Windows sdk#49234.
final sourceDir = Directory('./dawn');
final process = await Process.start("cmake", [
"--log-level",
"TRACE",
"-S",
".",
"-B",
"build_test",
"-Wno-dev",
], workingDirectory: sourceDir.path);
process.stdout.transform(utf8.decoder).listen((data) {
stderr.writeln(data);
});
process.stderr.transform(utf8.decoder).listen((data) {
stderr.writeln(data);
});
await process.exitCode;
Now in a isolate directory,
- git clone https://github.com/google/dawn.git (or another large cmake project)
- add a file to the root of the dawn directory build_dawn.dart
- dart -v run build_dawn.dart with the code below
// build_dawn.dart
import "dart:io";
void main(List<String> arguments) {
final process = await Process.run('cmake', [
'--log-level',
'TRACE',
'-S',
'.',
'-B',
'build',
'-Wno-dev',
]);
process.stdout.transform(utf8.decoder).listen((data) {
stdout.writeln(data);
});
await process.exitCode;
}
The process will not get stuck and will complete.
Any ideas why Process.start would work differently in the native_assets build hook on Windows?