문제

When the user executes a program with incorrect arguments, and the program prints a 'usage' instruction to the user, should this be printed to stderr?

도움이 되었습니까?

해결책

Many programs do it like this, gcc being one popular example. The rationale is that normal output of the program may be piped out to another program, which will get confused by the error message (which is purely intended for human consumption).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top