ambar@ora.com (Jean Marie Diaz) (02/06/91)
Archive-name: library/usenix/canthappen/1991-02-04 Archive: cs.toronto.edu:/doc/programming/canthappen.PS [128.100.1.65] Original-posting-by: ambar@ora.com (Jean Marie Diaz) Original-subject: Re: Complexity of reallocating storage Reposted-by: emv@ox.com (Edward Vielmetti) From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Date: 2 Feb 91 07:10:47 GMT > (void) read(fdsess,(char *) &newuid,sizeof(int)); This is guaranteed to work [...] > (void) chdir(".."); This is guaranteed to work. > (void) chdir(newsuid); > } Cannot fail. [and so forth] I commend to you a paper titled "Can't Happen, or /*NOTREACHED*/, or Real Programs Dump Core", by Ian Darwin & Geoff Collyer. It can be found in the proceedings of the Winter Usenix Conference, Dallas 1985, pages 136-151. Or FTP to cs.toronto.edu will get you the Postscript version under doc/programming/canthappen.PS. Since "anything that can go wrong will go wrong", it is a programmer's responsibility to deal with Murphy as gracefully as possible. Dumping core is never graceful. AMBAR