Repository navigation
feat(frontend): start the exit watchdog's helper process on Windows (#4589) - #4859
Conversation
…age (#4589) test/packaged-startup.py (Windows release lane) now requires obs-exit-watchdog.exe next to obs64.exe for the package's CPU, the log line "Exit watchdog: helper process started", and that the packaged helper, armed on a process that never exits by itself, ends it with exit code 124 and appends its line to the log. RED: no package has the helper yet, so the first check fails ("packaged exit watchdog helper is missing"); ci/test_packaged_startup.py covers the checks. Refs #4589 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…4589) create_log_file() starts the helper right after the log file opens, long before quit, so a first-start antivirus scan of it is over by then, and logs "Exit watchdog: helper process started". obs_exit_watchdog_arm() then arms the helper instead of the thread. On other hosts obs_exit_watchdog_start() returns false and nothing changes. frontend/cmake/feature-exit-watchdog.cmake builds the obs-exit-watchdog binary on Windows (Corrosion; its targets keep the hyphens, so the cargo build serialization is spelled out), copies it next to obs64.exe in the rundir and installs it to bin/64bit. The release signing signs every .exe in the package. docs/features.md: one entry. Refs #4589 Co-Authored-By: Claude Opus 5.5 <[email protected]>
43e0e38 to
adec46b
Compare
|
Package check: a
Not yet run: a quit of the real |
Refs #4589 (PR 2 of 3: OBS starts the helper, and the Windows package ships it). #4858 (the helper) is in master.
Problem
#4858 added the watchdog process (
obs-exit-watchdog.exe), but nothing in OBS starts it and no package ships it. So on Windows a plugin DLL that blocks its detach insideExitProcessstill leaves OBS hanging after its window has closed.Change
frontend/obs-main.cpp.hpp:create_log_file()calls the newobs_exit_watchdog_start(path)right after the log file opens, long before quit, so a first-start antivirus scan of the helper is over by then. When the helper starts, OBS logsExit watchdog: helper process started.obs_exit_watchdog_arm()at quit then arms the helper instead of the thread (feat(exit-watchdog): a watchdog process ends a hang in ExitProcess on Windows (#4589) #4858). On Linux and macOS,startreturns false and nothing changes.frontend/utility/obs-exit-watchdog.h,rust/obs-exit-watchdog/src/ffi/mod.rs:obs_exit_watchdog_start(const char *log_path).frontend/cmake/feature-exit-watchdog.cmake: on Windows, with the frontend's Rust:obs-exit-watchdogbinary with Corrosion. Its Corrosion targets keep the hyphens (cargo-build_obs-exit-watchdog), so the one-cargo-build-at-a-time chain ofobs_serialize_cargo_build()is spelled out instead of called.obs64.exein the rundir and installs it tobin/64bit.ci/windows_sign.py) signs every.exein the ZIPs, so this one is signed too.docs/features.md: one entry.Tests
RED
6339f11ab:test/packaged-startup.py, which the Windows release lane runs on the built package, now requires three things:obs-exit-watchdog.exenext toobs64.exe, built for the package's CPU (require_windows_watchdog_helper);Exit watchdog: helper process started(require_watchdog_started);require_watchdog_ends_a_blocked_process). It is armed, as OBS arms it at quit, on a process that never exits by itself, through an explicit handle list. It must end that process with exit code 124 and append its line to the log.A package built before this PR has no helper, so it fails the first check.
ci/test_packaged_startup.pycovers the three checks (50 tests pass).GREEN
adec46bdc: the start call and the CMake.What ran:
require_watchdog_ends_a_blocked_processagainst the helper built from feat(exit-watchdog): a watchdog process ends a hang in ExitProcess on Windows (#4589) #4858's branch. It ended the blocked process with 124 and wrote the line ("packaged exit watchdog: helper ended a blocked process").clang-format22.1.3 andgersemi0.25.0 on the changed C++ and CMake.What did not run:
obs64.exewith a blocking plugin. PR CI builds no OBS app, and this machine has no Windows app build tree. The release workflow'sverify_onlyrun on this branch builds the Windows package and runstest/packaged-startup.pyon it. That run is the check of the CMake, the log line and the packaged helper, and its result goes on this PR before it leaves draft.Refs, notFixes. exit-watchdog: End a plugin's blocked DLL detach on Windows #4589 stays open for PR 3 (naming the DLL) in any case.🤖 Generated with Claude Code