record-daemon: keep one recorder running per machine
One test recording produced two half-files: the game in one, the microphone in the other. Two daemons were alive at once, each with its own OBS, and only one of them won the game's capture hook and its audio. Any launch path can start a daemon (the app when it cannot reach the pipe, the tray, a manual run) and the pipe server accepts a second instance without complaint, so nothing stopped the second copy. The daemon now claims a lock file in its configuration directory before booting OBS. On Windows the file is opened with a share mode of zero, so a second open fails with a sharing violation; on Unix an exclusive flock does the same. The loser logs which process holds the lock and exits, leaving the running recorder alone. Closing the handle releases the lock, so a crash does not leave the machine without a recorder.
This commit is contained in:
1 parent
2953ab1ee3
commit
9f5f1f669d
5 files changed
+129
No files matched your search
Generated
+1
@@ -2398,6 +2398,7 @@ dependencies = [
|
||||
"directories",
|
||||
"display-info",
|
||||
"futures",
|
||||
"libc",
|
||||
"libobs",
|
||||
"libobs-bootstrapper",
|
||||
"libobs-simple",
|
||||
|
||||
Reference in new issue
Block a user