aboutsummaryrefslogtreecommitdiff
path: root/libs/plugin_python/src/pybind11-utils/include/pybind11_utils/functional.h
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-05-08 17:33:00 -0500
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-05-08 17:33:00 -0500
commit227be23a0c141690bc7c27dafb9bcdb67f37075a (patch)
treeaf5314e2dc4ec9bd7511c3cb93a146031d3e91f9 /libs/plugin_python/src/pybind11-utils/include/pybind11_utils/functional.h
parent6391164071b859e901283bec098974ef6b104f50 (diff)
multiprocess: recover from stale SysV shm + unix socket after crash
Linux QSharedMemory uses SysV segments that survive process crashes. On the next launch, m_SharedMem.create() fails with AlreadyExists and the constructor would either treat the corpse as a live primary (blocking the user behind a ghost) or throw. The unix socket file is similarly left behind and would make QLocalServer::listen() fail with AddressInUseError if reclaim succeeded. Now: probe the primary's listener via QLocalSocket::connectToServer before believing the segment is alive. If the probe fails, detach and re-create. If create then fails (another attached client keeps refcount > 0), re-attach so the constructor returns in a usable secondary state instead of silently no-op'ing every later sendMessage. Also call QLocalServer::removeServer() before listen() to clear the orphaned socket file when we did successfully reclaim. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'libs/plugin_python/src/pybind11-utils/include/pybind11_utils/functional.h')
0 files changed, 0 insertions, 0 deletions