Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!emory!att!cbnewsl!sar0 From: sar0@cbnewsl.att.com (stephen.a.rago) Newsgroups: comp.unix.wizards Subject: Re: changing cmd listing for ps -f Keywords: ps command fork Message-ID: <1990Jul2.144524.5660@cbnewsl.att.com> Date: 2 Jul 90 14:45:24 GMT References: <8259@b11.ingr.com> Distribution: comp Organization: AT&T Bell Laboratories Lines: 9 In article <8259@b11.ingr.com>, kiick@b11.ingr.com (chris kiick) writes: > How can I change the command name that ps -f lists from within > a program? What I'm trying to do is to fork off a process that will > look different to a person doing a ps -f. Changing argv doesn't > seem to do it. Any Ideas? Try copying the command to a different name and, when the command starts, have it look at argv[0]. If it's the original name, then exec the other copy.