You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: frontend: SIGTERM is ignored while recording (exit confirmation) or while a dialog waits, and the recording is cut off (upstream #10011) #1402
Upstream bug: obsproject/obs-studio#10011, "OBS does not cleanly exit when sent SIGTERM", reported by Mikilio in December 2023 and still open (it replaced #9877, which was closed). Other users there: VladimirMrzv, rob215x, zzzeek ("how can OBS be cleanly terminated without using the UX?") and zyd-n ("Maybe one day I can cleanly exit obs from the command line?").
In this fork an idle OBS already quits cleanly on SIGTERM. Two cases still ignore it.
Location
frontend/OBSApp.cpp.hpp, OBSApp::processSigTerm(): saves, then calls quit(), which closes the main window.
While recording or streaming:frontend/widgets/OBSBasic.cpp.hpp, OBSBasic::closeEvent(). With an output active and "Show confirmation on exit while outputs are active" on (the default, ConfirmOnExit), shouldPromptForClose() is true, so it ignores the close and opens the "exit anyway?" dialog.
While a modal dialog waits, for example the "encoder missing" warning the main window opens during its startup (OBSBasic_Profiles.cpp.hpp): the dialog runs its own event loop and the quit ends nothing. Before the main event loop has started, quit() does nothing at all.
Class
Data loss: the recording is cut off when the sender gives up and kills OBS, and the next start is an unclean one.
How it is reached
Start a recording, then kill <pid>, systemctl stop for a unit running OBS, or log out or shut down (logind sends SIGTERM). Or start OBS with a profile whose encoder is missing and send SIGTERM while the warning is up. Nobody answers the dialog, so OBS stays up until the sender's timeout and SIGKILL.
Reproduced in the current release
v0.1.0-beta.20261014 AppImage, headless (private Xvfb, private D-Bus, fresh HOME), driven over obs-websocket: Simple output, x264, MKV, exit confirmation left on.
On SIGTERM, close without the exit confirmation (nobody can answer it), so closeWindow() stops the outputs and waits for the recording to finish, as when the dialog is answered with Yes. If a modal dialog is open, dismiss it and quit once its loop has returned; quit right after a startup that SIGTERM interrupted. Closing the window, Exit in the menus and SIGINT keep the confirmation. PR follows.
@Mikilio you reported this in obsproject/obs-studio#10011: OBS does not exit cleanly when sent SIGTERM. That's fixed here in obs-rust by #1403, merged today with a regression test.
SIGTERM now quits OBS while it records or streams, without the "exit anyway?" dialog nobody can answer, and the recording is finished first. It also quits while a modal dialog waits, including one shown during startup. Closing the window and Exit in the menus still ask, and SIGINT is unchanged.
Tested headless, recording with the exit confirmation on. 0.1.0-beta.20261014 was still running 30 s after SIGTERM and left an unfinished file. With the fix, OBS quits after 1.2 s with a clean shutdown in the log, and the MKV is complete (ffprobe: 4.97 s).
It will be in the next obs-rust daily release after 0.1.0-beta.20261018: https://github.com/obs-rust/obs-studio/releases (Windows, macOS and Linux builds; on Arch it's obs-studio-rust-git in the AUR). obs-rust is an AI-assisted fork of OBS, based on current OBS master, with extra bug fixes like this one.
Activity
rdoupe commentedon Oct 18, 2026
Claiming: this issue. RED (Tier 4 shutdown phase) and GREEN are ready; PR follows once the full test run finishes.
frontend: Quit on SIGTERM while outputs run or a dialog waits (obs-ru…
rdoupe commentedon Oct 18, 2026
@Mikilio you reported this in obsproject/obs-studio#10011: OBS does not exit cleanly when sent SIGTERM. That's fixed here in obs-rust by #1403, merged today with a regression test.
SIGTERM now quits OBS while it records or streams, without the "exit anyway?" dialog nobody can answer, and the recording is finished first. It also quits while a modal dialog waits, including one shown during startup. Closing the window and Exit in the menus still ask, and SIGINT is unchanged.
Tested headless, recording with the exit confirmation on. 0.1.0-beta.20261014 was still running 30 s after SIGTERM and left an unfinished file. With the fix, OBS quits after 1.2 s with a clean shutdown in the log, and the MKV is complete (ffprobe: 4.97 s).
It will be in the next obs-rust daily release after 0.1.0-beta.20261018: https://github.com/obs-rust/obs-studio/releases (Windows, macOS and Linux builds; on Arch it's
obs-studio-rust-gitin the AUR). obs-rust is an AI-assisted fork of OBS, based on current OBS master, with extra bug fixes like this one.