Skip to content

Commit

Permalink
fix: set process name for idle workers
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Dec 3, 2023
1 parent ceca93d commit ca56b22
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/vitest/src/runtime/child.ts
Original file line number Diff line number Diff line change
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 ca56b22

Please sign in to comment.