c++ - Windows process exit codes in the event of term signals -


in unix/linux environments quite easy determine whether program has exited due signal interrupt (sigterm), , signal interrupt.

it possible determine (programmatically using api's or exit code) whether windows program has exited due signal (sigkill, powershell example)?

to expand on question:

  • is possible user kill application e.g task manager, or powershell? ??
  • if application unresponsive , os kills application, exit code be? ??

windows has "many, many" error codes, , want know ones relate process management only.

kind regards,

no there not since windows not have signals. terminating process happens using terminateprocess api.

terminateprocess caller pass in exit code, there no documented value powershell or task manager set to.

windows not define process exit codes, application may use exit codes wants. there no "process management error codes" check for.

to answer questions directly:

is possible user kill application e.g task manager, or powershell?

yes is. can kill process task manager, powershell uses kill or stop-process or using taskkill command line.

if application unresponsive , os kills application, exit code be?

there no guaranteed exit code this. windows sets something, implementation detail , open change between different versions of windows.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -