Adding background cmd execution capabilities for the proc executor. This can be done by prefixing the command with exec-background (e.g. exec-background notepad.exe). This will allow agents to run some background process and continue executing links without having to wait for it. Note that execution won't be responsible for collecting output or terminating the process - additional abilities would be required for that.
Also refactoring additional existing proc executor code for golang unit tests.
Type of change
[x] New feature (non-breaking change which adds functionality)
[x] This change requires a documentation update
How Has This Been Tested?
Created and ran golang unit tests. Also recompiled agents and tested them on Linux, Mac, and Windows - confirmed that running background processes like sh -c "sleep 200" and notepad.exe did not prevent the agent from continuing execution, and the processes were executed correctly in the background.
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[ ] I have made corresponding changes to the documentation
[x] I have added tests that prove my fix is effective or that my feature works
Description
Adding background cmd execution capabilities for the
proc
executor. This can be done by prefixing the command withexec-background
(e.g.exec-background notepad.exe
). This will allow agents to run some background process and continue executing links without having to wait for it. Note that execution won't be responsible for collecting output or terminating the process - additional abilities would be required for that.Also refactoring additional existing
proc
executor code for golang unit tests.Type of change
How Has This Been Tested?
Created and ran golang unit tests. Also recompiled agents and tested them on Linux, Mac, and Windows - confirmed that running background processes like
sh -c "sleep 200"
andnotepad.exe
did not prevent the agent from continuing execution, and the processes were executed correctly in the background.Checklist: