Unverified Commit 621c73a2 authored by Luke Sandberg's avatar Luke Sandberg Committed by GitHub

change the process name of builds (#92411)

When `next dev` is running we change the process name, we should do the
same thing for builds.

This is a small performance hit on MacOs, about 10ms, (See node issue:
https://github.com/nodejs/node/issues/59678), but not on other
platforms. `process.title` is also apparently not implemented on `Bun`
or `Deno` 🤦
parent 8aca9e3b
......@@ -36,6 +36,7 @@ export type NextBuildOptions = {
}
const nextBuild = async (options: NextBuildOptions, directory?: string) => {
process.title = `next-build (v${process.env.__NEXT_VERSION})`
process.on('SIGTERM', () => {
saveCpuProfile()
process.exit(143)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment