mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
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:
@@ -0,0 +1,19 @@
|
||||
//go:build !windows
|
||||
|
||||
package audit
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestApplyDetachAttrsSetsSetsidOnUnix(t *testing.T) {
|
||||
cmd := exec.Command("true")
|
||||
applyDetachAttrs(cmd)
|
||||
|
||||
require.NotNil(t, cmd.SysProcAttr, "applyDetachAttrs must populate SysProcAttr")
|
||||
assert.True(t, cmd.SysProcAttr.Setsid, "Unix detach must set Setsid so child becomes a new session leader")
|
||||
}
|
||||
Reference in New Issue
Block a user