Path: utzoo!attcan!uunet!samsung!sdd.hp.com!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!jjones From: jjones@casca.cs.uiuc.edu (Joel Jones) Newsgroups: comp.unix.questions Subject: Re: Get process name w/o using argv[0] in C function? Message-ID: Date: 3 Aug 90 13:51:21 GMT References: <9220003@hpldsla.sid.hp.com> <53103@iuvax.cs.indiana.edu> Sender: news@brutus.cs.uiuc.edu Organization: U of Illinois, CS Dept., Systems Research Group Lines: 14 One reason one may not be able to use a global is if the function that needs the process name may be a library that is linked in. One way of accomplishing the goal (though inefficient) is to do a getpid(2), and then do a popen(3) with an argument of "ps -p pid ..." Joel Jones jjones@uiuc.edu -- Joel Jones As the advertisment for an exhibition on Leonardo da Vinci said, jones@uiuc.edu "They called him a genius, a botanist, a demon, a philosopher, a practical joker, an eccentric, and a visionary. No wonder he was such a great engineer."