Complexity of reallocating storage (was users command crap)

Richard A. O'Keefe ok at goanna.cs.rmit.oz.au
Mon Feb 4 15:58:36 AEST 1991


In article <14994:Feb207:10:4791 at kramden.acf.nyu.edu>, brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
> >    if (chdir(newsuid) == -1) {
> >      (void) mkdir(newsuid,0700);

> This cannot fail unless some renegade sysadmin changes the mode of the
> session directory while pty is running.

Er, what about the disc running out of I-nodes?  Or going over quota?
Or a file server dropping dead?

> >      (void) chdir(newsuid);
> >     }

> Cannot fail.

Can fail if the preceding mkdir() failed -- see above.

There is *always* another way for things to go wrong.
-- 
The Marxists have merely _interpreted_ Marxism in various ways;
the point, however, is to _change_ it.		-- R. Hochhuth.



More information about the Comp.lang.c mailing list