Instead of gracefully returning an error code to the parent application, I print the error to the screen and bail out of the code.
我没有按通常作法将错误代码返回给父代应用程序,而是将错误打印到屏幕,然后退出程序。
2
This lets your application gracefully exit validation, printerror messages, or even to try to recover from the error and continue validating.
从而让应用程序从容地退出验证、打印错误消息,甚至可以尝试从错误中恢复并继续验证。
3
There's no need to printerror messages for this case since file descriptors 0 through 2 are only closed if an attacker is trying to subvert your program.