I have a console application deploying to a Windows EC2 instance and can't figure out how to close stdout in such a way that satisfies AWS CodeDeploy (currently it hangs until timeout on the ApplicationStart hook and then errors out "Script at specified location: [start server script] failed to close STDOUT").
I've tried redirecting on the command line with the following start-server.bat:
start "application name" [application path] > nul 2>&1 < nul
exit
and I've tried redirecting in code with Console.SetOut()
(C#).
Neither works and I'm not sure what else to try.