MCPcopy Index your code
hub / github.com/codeyourweb/irma / SpawnFakeProcess

Function SpawnFakeProcess

faker.go:13–28  ·  view source on GitHub ↗

SpawnFakeProcess drop an useless process and execute it

(processName string)

Source from the content-addressed store, hash-verified

11
12// SpawnFakeProcess drop an useless process and execute it
13func SpawnFakeProcess(processName string) (err error) {
14 err = os.WriteFile(processName, faker, 0644)
15 if err != nil {
16 return err
17 }
18
19 var sI syscall.StartupInfo
20 var pI syscall.ProcessInformation
21 argv := syscall.StringToUTF16Ptr(processName)
22 err = syscall.CreateProcess(nil, argv, nil, nil, true, 0, nil, nil, &sI, &pI)
23 if err != nil {
24 return err
25 }
26
27 return nil
28}

Callers 1

SpawnFakeProcessesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected