I've got a problem with Process.Start()
- it is returning a process PID which is indicating that the process has started correctly, but I can't see it in processes, no log nor error is recorded from the Main method. Code which is starting process:
public static int StartBackgroundProcess(string fileName, string arguments)
{
int processId = INVALID_PROCESS_ID;
try
{
using (Process p = new Process())
{
p.StartInfo.FileName = fileName;
p.StartInfo.Arguments = arguments;
p.StartInfo.UseShellExecute = false;
p.Start();
processId = p.Id;
}
}
catch (Exception ex)
{
Logger.Error(ex);
}
return processId;
}
NOTE: I've got the exit code:
2016-09-19 17:44:15 [23] DEBUG Process exit code: -1073741502