If both lpApplicationName and lpCommandLine are non-NULL, the null-terminated string pointed to by lpApplicationName specifies the module to execute, and the null-terminated string pointed to by lpCommandLine specifies the command line. The new process can use GetCommandLine to retrieve the entire command line. Console processes written in C can use the argc and argv arguments to parse the command line. Because argv[0] is the module name, C programmers generally repeat the module name as the first token in the command line.
The current implementation doesn't repeat it, which causes some issues on non-Windows platforms. In particular, the process name is set to the first token in the command line, leading to it being named weird things like -screen-fullscreen.
Microsoft documentation states:
The current implementation doesn't repeat it, which causes some issues on non-Windows platforms. In particular, the process name is set to the first token in the command line, leading to it being named weird things like
-screen-fullscreen
.This pull request fixes the issue.