修复进程锁可能不会被正常移除的问题

This commit is contained in:
undefined committed 2020-07-24 18:27:22 +08:00
1 parent cb611d8f08
commit 55754b2e20
4 files changed
+6 -6

No files matched your search

+1 -2
View File
@@ -64,8 +64,7 @@ interface EntryConfig {
async function entry(config: EntryConfig) {
if (config.entry) {
if (config.newProcess) {
const sargv = [`--entry=${config.entry}`];
const p = await fork(sargv);
const p = await fork([`--entry=${config.entry}`]);
await new Promise((resolve, reject) => {
p.on('exit', (code, signal) => {
if (code === 0) resolve();