Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个旨在在某些条件下退出的子进程,我使用了 exit(-2)。但是在调用 WEXITSTATUS 之后,该值大约为 256。如果我使用 exit(2),WEXITSTATUS 将返回正确的值。在退出调用中使用负值的任何原因是这样做的吗?