home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!shady!kevin
- From: kevin@shady.UUCP (Kevin Smith)
- Newsgroups: comp.unix.aix
- Subject: Re: Changing name associated with a process
- Summary: ps -f
- Message-ID: <22@shady.UUCP>
- Date: 25 Jul 92 04:11:20 GMT
- References: <mwarren.711724488@rws1> <mwarren.711816903@rws1>
- Reply-To: uunet!shady!kevin
- Organization: ShadeTree Software, Inc.
- Lines: 28
-
- In article <mwarren.711816903@rws1> mwarren@rws1.ma30.bull.com (Mark Warren) writes:
- :>A few people replied to me, and the answer is even easier than BSD.
- :>The following program does exactly what it appears to do:
- :>
- :>main(ac, av)
- :>int ac;
- :>char *av[];
- :>{
- :> av[0] = "new name";
- :> sleep(60);
- :>}
-
- Since UNIX SYS-3 a plain 'ps' will report the basename of the command as
- stored in the kernel proc structure. Setting av[0] will not help this.
-
- The system does not save the command's arguments as part of the internal
- proc structure. Therefore, 'ps -f', examines the actual process memory
- image and attempts to parse the argv[] array to display the full argument
- list. 'ps -f' faithfully follows your new av[0] pointer.
-
- The crypt command has always scribbled on it's av[] to obscure the key if
- it was passed as an arg. Versions of uucico have been known to change
- their names to UUCICO.
- --
- | Email - !shady!kevin uunet!shady!kevin
- Kevin Smith | Voice - (908) 874-7980
- | Mail - ShadeTree Software, Inc., 192 Capricorn Dr. #10,
- | Somerville, NJ 08876
-