🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.4bsd
Article #281

Re: Complexity of reallocating storage (was users command crap)

#281
From: Geoffrey Collyer
Date: Sat, 02 Feb 1991 04:51
23 lines
1122 bytes
Dan Bernstein, in response to Ozan Yigit:
> To rephrase: You don't seem to know what good programming techniques are.

From pty/master.c:

   (void) lseek(fdsess,(long) 0,0);
   (void) read(fdsess,(char *) &newuid,sizeof(int));
   (void) sprintf(newsuid,"%d",newuid);

   (void) chdir("..");
   if (chdir(newsuid) == -1)
    {
     (void) mkdir(newsuid,0700);
     (void) chdir(newsuid);
    }

   (void) sprintf(foo,"../%d/%s",uid,fnsess);
   (void) rename(foo,fnsess);

   (void) sprintf(foo,"../%d/%s",uid,fnre);
   (void) rename(foo,fnre); /* in case we're already disconnected */
-- 
Geoff Collyer		utzoo!geoff, zoo.toronto.edu!geoff
Technical Details
Message-ID: <1991Feb2.045119.22199@zoo.toronto.edu>
Path: arc1-ca.pugleaf.net!utzoo!geoff
References: <6662@exodus.Eng.Sun.COM> <15325:Jan2903:19:4991@kramden.acf.nyu.edu> <21548@yunexus.YorkU.CA> <5883:Feb102:05:4991@kramden.acf.nyu.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.bugs.4bsd,comp.lang.c
Path: arc1-ca.pugleaf.net!utzoo!geoff
From: geoff@zoo.toronto.edu (Geoffrey Collyer)
Subject: Re: Complexity of reallocating storage (was users command crap)
Message-ID: <1991Feb2.045119.22199@zoo.toronto.edu>
Organization: U of Toronto Zoology
References: <6662@exodus.Eng.Sun.COM> <15325:Jan2903:19:4991@kramden.acf.nyu.edu>
 <21548@yunexus.YorkU.CA> <5883:Feb102:05:4991@kramden.acf.nyu.edu>
Date: Sat, 2 Feb 1991 04:51:19 GMT