System.Exec Function

From what I can remember from other threads System.Exec() does not work properly, but nobody has dug into it to find why. It seems to cause another copy of kodi.bin to be forked and run as normal rather than a fork and exec call that you would expect when forking a shell as a child process.

This causes two copies of Kodi to be running which is what causes the graphical glitches and listening socket to fail as the port is already be in use. As you say, the workaround seems to be to use RunScript() to call a python script instead.

CC @sam_nazarko