简体   繁体   中英

Process Exit Code When Process is Killed Forcibly

When we kill a process in Windows with Task Manager End Process command, will the process still return an exit code? And if so, what exit code it returns? Thanks

In general, a process is terminated using TerminateProcess . The exit code is passed as a parameter to this method.

In the case of the task manager, the exit code is set to 1, but I don't know if it's documented anywhere.

是的,它将返回非零返回码,它将包含在%ERRORLEVEL%变量中。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM