()
| 630 | } |
| 631 | |
| 632 | function stopOwnedLoops() { |
| 633 | var ownedPids = getOwnedLoopPids(getRunningPids()); |
| 634 | if (ownedPids.length === 0) { |
| 635 | try { if (fs.existsSync(PID_FILE)) fs.unlinkSync(PID_FILE); } catch (_) {} |
| 636 | return { status: 'not_running' }; |
| 637 | } |
| 638 | return stopPids(ownedPids, { unlinkPidFile: true, unlinkLock: true }); |
| 639 | } |
| 640 | |
| 641 | function restart(options) { |
| 642 | stopOwnedLoops(); |
no test coverage detected