Article View: comp.unix.programmer
Article #1025Re: Why use pwd(1) for getpwd(3C)? (Re: Why use find?)
From: Tom Christiansen
Date: Sat, 13 Oct 1990 18:47
Date: Sat, 13 Oct 1990 18:47
21 lines
1528 bytes
1528 bytes
In article <1990Oct13.121552.3878@virtech.uucp> cpcahil@virtech.UUCP (Conor P. Cahill) writes: >TOTALS 646704 1876.70 2071.13 907889.81 0.91 0.00 0.00 >pwd 689 1.90 0.61 2.72 3.10 0.00 0.22 > >Note that only 689 pwd's were run in an entire month. This includes >command line pwds that weren't built-in to the respective shells, all >calls to getcwd, etc. Well, on my system, I've got around twice your total of commands (1.2meg), but I've got 8000 calls to pwd, plus 27000 calls to the csh, who runs a getwd() when he starts up. I'm glad my system doesn't do the fork/exec to get its working directory. But I agree that "massively" faster is probably an overstatement. Programs shouldn't need to do more than one of these per run. I'm not expecting to lose the permissions on an enclosing directory very much. If anything, I'd be concerned about losing the very directory itself, something that a suid pwd won't solve. --tom
Technical Details
Message-ID:
<107160@convex.convex.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!sun-barr!newstop!texsun!convex!convex.COMReferences:
<1977@sixhub.UUCP> <1990Oct13.121552.3878@virtech.uucp>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!sun-barr!newstop!texsun!convex!convex.COM From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.unix.programmer Subject: Re: Why use pwd(1) for getpwd(3C)? (Re: Why use find?) Message-ID: <107160@convex.convex.com> Date: 13 Oct 90 18:47:07 GMT References: <1977@sixhub.UUCP> <1990Oct13.121552.3878@virtech.uucp> Sender: news@convex.com Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 21