Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!usc!sdsu!genbank!agate!ucbvax!icaen.uiowa.edu!dbfunk From: dbfunk@icaen.uiowa.edu (David B Funk) Newsgroups: comp.sys.apollo Subject: Re: more ignorant questions ... Message-ID: <8912151018.AA00864@icaen.uiowa.edu> Date: 15 Dec 89 10:03:20 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: Iowa Computer Aided Engineering Network, University of Iowa Lines: 38 WRT posting <8912131818.AA18099@richter.mit.edu>: > I've noticed that a number of Apollo supplied programs > manage to their process names (the ones shown by /com/pst) > no matter what name you use when you start the program. > Anyone have any idea how this is accomplished? By this I assume that you're refering to something like: 1) You start a process with the DM "cps" or a "crp -cps" command such as: "Command: cps /sys/ncs/llbd -n my_name" (sr9.7) 2) You then do a "/com/pst" and see: ... 34246.796 3/14/14 3B416592 Wait tcp_server 42.164 3/14/14 3B416072 Wait netman 32.812 3/13/14 3B416592 Wait process_333 1307.390 3/14/14 3B416592 Wait ns_helper 10.636 3/14/14 3B416592 Wait llbd 0.123 3/14/14 3B416592 Wait message ... And you notice that "my_name" is gone and that "llbd" is now there. Here's what is happening; The name that you gave to the process during the process creation was OK, but the program was written so that it did some stuff and then did a Unix "fork" to create a new copy of itself. The parent process (the one that you started and named) then exited and the new child process was un-named so it was free to set its own name with the "set my name" system call. A program usually does the "fork" trick when it wants to do things like change the standard streams around or detach itself from the controlling "tty" or if it's a "set-uid" program. BTW don't try to go changing the names that you find in `node_data/proc_dir. This can cause problems/confusion and under sr10, you can see named processes with pst and find no entry for them in `node_data/proc_dir. Dave Funk