Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!diku!olamb!kimcm From: kimcm@olamb.UUCP (Kim Chr. Madsen) Newsgroups: comp.unix.questions Subject: Re: Destroying arguments Message-ID: <289@olamb.UUCP> Date: Thu, 21-May-87 07:02:05 EDT Article-I.D.: olamb.289 Posted: Thu May 21 07:02:05 1987 Date-Received: Sat, 23-May-87 14:34:09 EDT References: <292@osupyr.UUCP> <239@polyof.UUCP> <485@bene.UUCP> <6723@mimsy.UUCP> <19131@sun.uucp> Distribution: comp.unix.questions Organization: AmbraSoft A/S (Denmark) Lines: 25 In article <19131@sun.uucp>, guy%gorodish@Sun.COM (Guy Harris) writes: > > As do most other versions of "ps". The 3B2 version of "ps" does it > differently; the kernel stashes a string away in the U area that > contains the original arguments used to invoke the program. (I have > no idea whether this was done because somebody thought this was the > right way to do things, or because they couldn't figure out how to > snarf the arguments up on a machine whose stack grows upward in > memory....) On this machine, you *can't* smash your argument list. > Period. (remove 'period) It can be done on the 3B2 w/ standard ps(1), I've used it! (set 'period) I've used the argv[1] to tell some status information about the program, which ran in the background and just doing a "ps -fp " returned the info. nicely. For information I ran this under UNIX V 2.0.4 on a 3B2-400. And don't tell me it's non-portable it wasn't meant to be ! Kim Chr. Madsen