Zabbix uses common functionality to execute user parameters, remote commands, system.run items without the "nowait" flag, scripts (alert, external and global) and some internal commands.
The command/script is executed similarly on both Unix and Windows platforms:
Steps 5-7 do not refer to remote commands as they are executed with a "nowait" flag.
Zabbix assumes that a command/script has done processing when the initial child process has exited AND no other process is still keeping the output handle/file descriptor open. When processing is done, ALL created processes are terminated.
All double quotes and backslashes in the command are escaped with backslashes and the command is enclosed in double quotes.