feat: Add Support for Optimistic Cloud Sync (#273)

* feat: Add support for background sync

* refactor: Maintain single source of truth for command defn

* fix: Code review fixes

* fix: Code review fixes

* docs: Add corner case inline doc
This commit is contained in:
Abhisek Datta
2026-05-20 13:56:50 +05:30
committed by GitHub
parent 5872f5281f
commit 9b0e12f130
20 changed files with 868 additions and 6 deletions
+20
View File
@@ -0,0 +1,20 @@
//go:build windows
package audit
import (
"os/exec"
"syscall"
"golang.org/x/sys/windows"
)
// applyDetachAttrs configures cmd so that the child process is fully
// detached from the parent's console and process group. DETACHED_PROCESS
// removes the inherited console; CREATE_NEW_PROCESS_GROUP isolates the
// child from Ctrl+C events sent to the parent's group.
func applyDetachAttrs(cmd *exec.Cmd) {
cmd.SysProcAttr = &syscall.SysProcAttr{
CreationFlags: windows.DETACHED_PROCESS | windows.CREATE_NEW_PROCESS_GROUP,
}
}