Skip to content

Commit

Permalink
Refactor command execution to use a dynamic script path and also adde…
Browse files Browse the repository at this point in the history
…d comments

Signed-off-by: GLVS Kiriti <glvskiriti2003369@gmail.com>
  • Loading branch information
GLVSKiriti authored and poiana committed Apr 5, 2024
1 parent 4489ba0 commit 9a3a784
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions events/syscall/execution_from_dev_shm.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func ExecutionFromDevShm(h events.Helper) error {
return err
}

cmd := exec.Command("sh", "-c", "cd /dev/shm/ && ./example_script-created-by-falco-event-generator.sh")
defer os.Remove(scriptPath) // Remove script file
cmd := exec.Command("sh", "-c", scriptPath) // Execute script file
defer os.Remove(scriptPath) // Remove script file
return cmd.Run()
}

0 comments on commit 9a3a784

Please sign in to comment.