Skip to content

Commit

Permalink
[#59970] Fix FdTable teardown
Browse files Browse the repository at this point in the history
  • Loading branch information
GPlaczek committed Oct 25, 2024
1 parent ba291dd commit 9e994c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/process-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class FdTable {
}

tearDown() {
Promise.all(
return Promise.all(
Object.values(this.fdt).map(async (fileDescriptor) => {
if (fileDescriptor !== undefined) {
if (fileDescriptor.desc !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions src/syscalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export default async function syscallCallback(
: false;

if (sigintOccurred) {
fds.tearDown();
await fds.tearDown();
Atomics.store(parentLck, 0, constants.EXIT_INTERRUPTED);
Atomics.notify(parentLck, 0);
break;
Expand Down Expand Up @@ -378,7 +378,7 @@ export default async function syscallCallback(

if (isBrowserApp) {
// Close stdout and stderr in browser apps
fds.tearDown();
await fds.tearDown();
}

break;
Expand Down

0 comments on commit 9e994c1

Please sign in to comment.