Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!adm!news From: konczal@mail-gw.ncsl.nist.gov (Joseph C. Konczal) Newsgroups: comp.unix.questions Subject: How to find process name in c? Message-ID: <23896@adm.BRL.MIL> Date: 17 Jul 90 19:51:21 GMT Sender: news@adm.BRL.MIL Lines: 16 From: "Conor P. Cahill" Date: 15 Jul 90 01:59:57 GMT An easy way to see if a particular executable is running is to try to open the file with write permissions. If you get the errno ETXTBSY, the executable is being run. Where does this happen, what kind of Unix? I have overwritten executable files that are currently running under various revisions of BSD, SunOS, even VMS, without ever getting errno ETXTBSY. After the image is loaded into core, why should the OS care what you do to the copy still on disk? ETXTBSY is not even listed in the `Errors' section of the SunOS `open' man page. --Joe Konczal konczal@mail-gw.ncsl.nist.gov