[vm] Add test that dart:io.exit should work even if isolates are blocked.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/51560
Change-Id: I6634594a19b746a9bc4c70de58e475576372eb4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287002
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
Ryan Macnak 2023-03-07 17:53:27 +00:00 committed by Commit Queue
parent 5f8c28e226
commit 219c4140b5

View file

@ -0,0 +1,19 @@
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import "dart:io";
import "dart:isolate";
child(msg) {
// This should work even though the parent isolate is blocked and won't
// respond to OOB messages such as shutdown requests.
exit(0);
}
main() {
Isolate.spawn(child, null);
// The test harness provides no input, so this will block forever.
stdin.readByteSync();
}