How to find process name in c?
Joseph C. Konczal
konczal at mail-gw.ncsl.nist.gov
Wed Jul 18 05:51:21 AEST 1990
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
More information about the Comp.unix.questions
mailing list