Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!kth!draken!tut!santra!hemuli.atk.vtt.fi!tml From: tml@hemuli.atk.vtt.fi (Tor Lillqvist) Newsgroups: comp.sys.hp Subject: Munging argv to change ps output Message-ID: <3986@hemuli.atk.vtt.fi> Date: 21 May 89 14:47:07 GMT Reply-To: tml@hemuli.atk.vtt.fi (Tor Lillqvist) Organization: Technical Research Centre of Finland Lines: 16 What is the correct and reliable way to munge the command line of a program on HP-UX (3.01 on the hp9000s800) so that you can change what ps(1) shows? How exactly does ps decide what to output as the "command line"? I would be grateful if someone could send me some example code. For instance, ftpd (the newest version from uunet, which I have installed) tries to do this, but ps shows the command as "[ftpd]". Ftpd writes over both the argv and envp strings, which are located at the bottom of the user stack, is this a good idea? Wouldn't it be best to first copy the environment strings somewhere else and make environ point there? -- Tor Lillqvist Technical Research Centre of Finland, Computing Services (VTT/ATK) tml@hemuli.atk.vtt.fi (130.188.52.2)