Can't Happen or /* NOTREACHED */ or Real Programs Dump Core*

Can't Happen or /* NOTREACHED */ or Real Programs Dump Core*
复制标题

不可能发生或 /* 未达到 */ 或真实程序转储核心*

DOI:
--
复制
发表时间:
1989
期刊:
--
影响因子:
--
通讯作者:
Geoffrey Allen Collyer
Geoffrey Allen Collyer
中科院分区:
--
文献类型:
--
作者:
I. Darwin;Geoffrey Allen Collyer

文献摘要

被引文献

相似文献

Unix†程序员通常无法检查系统呼叫或功能的失败,以熟悉的青少年尝试“不可能发生在我身上(或我的程序)”。采取预防措施。批判性地进行实际生产(或SOI-DISANT生产),并将检查其中的每个程序。
UNIX† programmers too often fail to check for failure of system calls or functions, taking the familiar teen-age attitude that ‘‘it can’t happen to me (or my program)’’. This paper will attempt to convince its audience to take prophylactic measures. Those who take such measures will be healthier − and less prone to surprises − than those who don’t take such measures. In the tradition of the classic Elements of Programming Style some real-world programs will be criticised publicly. Actual production (or soi-disant production) UNIX programs and subsystems will be examined. Each of these ‘‘provides one or more lessons in style.’’ We present both before and after versions of most code fragments.