Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 (Tek) 9/26/83; site azure.UUCP Path: utzoo!linus!decvax!tektronix!azure!philipl From: philipl@azure.UUCP (Philip Lantz) Newsgroups: net.unix-wizards,tek.general Subject: Re: Parenthesized arguments in a "ps" list Message-ID: <2338@azure.UUCP> Date: Sat, 12-Nov-83 13:17:53 EST Article-I.D.: azure.2338 Posted: Sat Nov 12 13:17:53 1983 Date-Received: Mon, 14-Nov-83 04:10:38 EST References: <1466@tekig1.UUCP> Organization: Tektronix, Beaverton OR Lines: 24 Ps has a fixed size buffer into which it reads the command arguments (including the environment, which is pushed onto the stack before the arguments). The size is CLSIZE*NBPG (defined in /usr/include/sys/- param.h, 1024 on our VAX) bytes. Ps doesn't know where the beginning of the argument list is, so it starts at the end of the list and works backwards until it finds the beginning of the argument list. If it reaches the beginning of its buffer before it finds the beginning of the arguments, it gives up and just puts the command name (known by the system) in parentheses. So it is the total length of the argument list and environment which determines what ps will do. One common long environment variable is TERMCAP. I have taken to just setting this to the name of the file containing the termcap entry, instead of to the entry itself. (As documented in termcap(3)). Note that this is NOT an operating system problem; it is in ps. If you don't like it, you can fix you own version of ps that will keep reading blocks until it finds the beginning of the list. (On systems that do not need ps to be setuid, that is.) Philip Lantz tekmdp!philipl