adhdev 0.9.76-rc.52 → 0.9.76-rc.53

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/dist/cli/index.js CHANGED
@@ -93336,6 +93336,28 @@ function isManagedSessionHostPid2(pid) {
93336
93336
  if (!commandLine) return false;
93337
93337
  return /session-host-daemon/i.test(commandLine);
93338
93338
  }
93339
+ function getSessionHostSocketOwnerPids(endpoint) {
93340
+ if (endpoint.kind !== "unix") return [];
93341
+ try {
93342
+ const output = (0, import_child_process13.execFileSync)("lsof", ["-n", "-t", "-U", endpoint.path], {
93343
+ encoding: "utf8",
93344
+ timeout: 3e3,
93345
+ stdio: ["ignore", "pipe", "ignore"]
93346
+ });
93347
+ return Array.from(new Set(output.split(/\s+/).map((value) => Number.parseInt(value, 10)).filter((pid) => Number.isFinite(pid) && pid > 0 && pid !== process.pid)));
93348
+ } catch {
93349
+ return [];
93350
+ }
93351
+ }
93352
+ function stopSessionHostSocketOwners(endpoint) {
93353
+ let stopped = false;
93354
+ for (const pid of getSessionHostSocketOwnerPids(endpoint)) {
93355
+ if (isManagedSessionHostPid2(pid)) {
93356
+ stopped = killPid2(pid) || stopped;
93357
+ }
93358
+ }
93359
+ return stopped;
93360
+ }
93339
93361
  function stopManagedSessionHostProcess() {
93340
93362
  let stopped = false;
93341
93363
  const pidFile = getSessionHostPidFile();
@@ -93353,6 +93375,7 @@ function stopManagedSessionHostProcess() {
93353
93375
  } catch {
93354
93376
  }
93355
93377
  }
93378
+ stopped = stopSessionHostSocketOwners(getDefaultSessionHostEndpoint(SESSION_HOST_APP_NAME)) || stopped;
93356
93379
  return stopped;
93357
93380
  }
93358
93381
  function stopSessionHost() {
@@ -93950,7 +93973,7 @@ var init_adhdev_daemon = __esm({
93950
93973
  init_version();
93951
93974
  init_src();
93952
93975
  init_runtime_defaults();
93953
- pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.52" });
93976
+ pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.53" });
93954
93977
  AdhdevDaemon = class _AdhdevDaemon {
93955
93978
  localHttpServer = null;
93956
93979
  localWss = null;