How to find process name in c?
Yuval Yarom
yval at tasu17.UUCP
Thu Jul 19 02:41:31 AEST 1990
In article <23896 at adm.BRL.MIL> konczal at mail-gw.ncsl.nist.gov (Joseph C. Konczal) writes:
|
| From: "Conor P. Cahill" <cpcahil at virtech.uucp>
| 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 at mail-gw.ncsl.nist.gov
It seems that ETXTBSY does not appear in the SunOS manuals, but it does work
(at least here).
I think that this featureis not documented because it works only if
the executable is running on the local machine.
--
Yuval Yarom
yval at taux01.nsc.com
More information about the Comp.unix.questions
mailing list