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

process.on("exit") not running #6182

Closed
DWboutin opened this issue Sep 29, 2023 · 2 comments
Closed

process.on("exit") not running #6182

DWboutin opened this issue Sep 29, 2023 · 2 comments
Labels
bug Something isn't working node.js Compatibility with Node.js APIs

Comments

@DWboutin
Copy link

What version of Bun is running?

1.0.3+25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a

What platform is your computer?

Darwin 22.6.0 x86_64 i386

What steps can reproduce the bug?

Just using mongodb-memory-server in it's simplest way

beforeAll(async () => {
    mongod = await MongoMemoryServer.create()
    const uri = mongod.getUri()

    mongoose.connect(uri, {
        dbName: 'kiosq',
      })
  })

child_process.on("close") handler is called before the process is actually exited

What is the expected behavior?

child_process.on("close") handler should be called when exited

What do you see instead?

No response

Additional information

typegoose/mongodb-memory-server#801

@DWboutin DWboutin added the bug Something isn't working label Sep 29, 2023
@Electroid Electroid changed the title Mongo-memory-server issues process.on("exit") not running Oct 2, 2023
@Electroid Electroid added the node.js Compatibility with Node.js APIs label Oct 2, 2023
@Electroid
Copy link
Contributor

process.exit works, the issue appears to be related to beforeAll.

process.on('exit', function(code) {
  console.log('Exiting:', code);
});
Exiting: 0

@Electroid
Copy link
Contributor

Duplicate of #5308

@Electroid Electroid marked this as a duplicate of #5308 Feb 5, 2024
@Electroid Electroid closed this as not planned Won't fix, can't repro, duplicate, stale Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working node.js Compatibility with Node.js APIs
Projects
None yet
Development

No branches or pull requests

2 participants