Skip to content

Conversation

@mag123c
Copy link
Contributor

@mag123c mag123c commented Nov 28, 2025

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

When using enableShutdownHooks(), NestJS calls process.kill(process.pid, signal) after shutdown hooks complete. This does not properly trigger the Node.js 'exit' event, which prevents async loggers like Pino (with pino.transport()) from flushing their buffered logs before the process terminates.

Issue Number: #15978

What is the new behavior?

Added a new useProcessExit option to enableShutdownHooks()

Does this PR introduce a breaking change?

  • Yes
  • No

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2272eb36-b781-4176-b645-175ad58873a5

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 88.94%

Totals Coverage Status
Change from base Build 537ec496-1cf9-4417-b343-0c068794f623: 0.001%
Covered Lines: 7326
Relevant Lines: 8237

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants