@openagents-org/agent-launcher 0.2.15 → 0.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/daemon.js +7 -8
package/package.json
CHANGED
package/src/daemon.js
CHANGED
|
@@ -209,14 +209,13 @@ class Daemon {
|
|
|
209
209
|
}
|
|
210
210
|
} catch {}
|
|
211
211
|
|
|
212
|
-
//
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
// Busy-wait 500ms (sync, used only in CLI stop command)
|
|
212
|
+
// Always clean up PID and status files after kill attempt
|
|
213
|
+
try { fs.unlinkSync(pidFile); } catch {}
|
|
214
|
+
try { fs.unlinkSync(statusFile); } catch {}
|
|
215
|
+
|
|
216
|
+
// Wait briefly for process to die
|
|
217
|
+
for (let i = 0; i < 5; i++) {
|
|
218
|
+
if (!Daemon._isAlive(pid)) return true;
|
|
220
219
|
execSync(IS_WINDOWS ? 'ping -n 2 127.0.0.1 >nul' : 'sleep 0.5', {
|
|
221
220
|
stdio: 'ignore', timeout: 5000,
|
|
222
221
|
});
|