Skip to content

Commit

Permalink
fix: set process name for idle workers (#4641)
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Dec 3, 2023
1 parent 54d52d4 commit eca25dc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/vitest/src/runtime/child.ts
Expand Up @@ -13,17 +13,17 @@ import { mockMap, moduleCache, startViteNode } from './execute'
import { createSafeRpc, rpcDone } from './rpc'
import { setupInspect } from './inspector'

try {
process.title = `node (vitest ${poolId})`
}
catch {}

async function init(ctx: ChildContext) {
const { config, workerId, providedContext } = ctx

process.env.VITEST_WORKER_ID = String(workerId)
process.env.VITEST_POOL_ID = String(poolId)

try {
process.title = `node (vitest ${poolId})`
}
catch {}

let setCancel = (_reason: CancelReason) => {}
const onCancel = new Promise<CancelReason>((resolve) => {
setCancel = resolve
Expand Down

0 comments on commit eca25dc

Please sign in to comment.