mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-23 00:29:22 +09:00
pnpm devでCtrl+Cで終了させてもプロセスが完全に殺せないのを修正 (#10914)
This commit is contained in:
parent
a80003cde5
commit
7cbd852fe5
@ -44,11 +44,17 @@ const fs = require('fs');
|
|||||||
if (!stat) throw new Error('not exist yet');
|
if (!stat) throw new Error('not exist yet');
|
||||||
if (stat.size === 0) throw new Error('not built yet');
|
if (stat.size === 0) throw new Error('not built yet');
|
||||||
|
|
||||||
await execa('pnpm', ['start'], {
|
const subprocess = await execa('pnpm', ['start'], {
|
||||||
cwd: __dirname + '/../',
|
cwd: __dirname + '/../',
|
||||||
stdout: process.stdout,
|
stdout: process.stdout,
|
||||||
stderr: process.stderr,
|
stderr: process.stderr,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// なぜかworkerだけが終了してmasterが残るのでその対策
|
||||||
|
process.on('SIGINT', () => {
|
||||||
|
subprocess.kill('SIGINT');
|
||||||
|
process.exit(0);
|
||||||
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await new Promise(resolve => setTimeout(resolve, 3000));
|
await new Promise(resolve => setTimeout(resolve, 3000));
|
||||||
start();
|
start();
|
||||||
|
Loading…
Reference in New Issue
Block a user