From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,6b04f5359af5c957 X-Google-Attributes: gidfee84,public From: denham@denham.zk3.dec.com (Jeffrey M. Denham) Subject: Re: Overwriting exe's crashes osf programs ? Why Date: 1996/02/22 Message-ID: <4giut5$rvv@zk2nws.zko.dec.com>#1/1 X-Deja-AN: 140695941 distribution: world references: <4gie5u$ngn@lal.interserv.net> organization: Digital Equipment Corporation reply-to: denham@zk3.dec.com (Jeffrey M. Denham) newsgroups: comp.unix.osf.osf1 In article <4gie5u$ngn@lal.interserv.net>, levine@amarex.com writes: >When we overwrite executables on disk programs running that exe crash...Can I aviod >with any link options ??? > > Jeremy Levine - levine@amarex.com > > This should be in the FAQ too. The Digitial UNIX I/O system doesn't support the ETXTBUSY functionality of some UNIX-based OS. The core dump happens when the thread running the overwritten program attempts to page in something from the image. What evers was at the old location may no longer be good text, so it dies with an illegal instruction fault. There's no cc/ld option to prevent this directly. Instead, you need a rule to mv a.out (or whatever -o specified) to the final image name. The mv leaves the original file open internally without interference. When the last processes running the program exits, the internal copy of the replaced program will be deleted. -- ----------------------------------------------------------------------------- Jeff Denham, Unix Software Group, Digital Equipment Corporation email: denham@zk3.dec.com, voice: (603) 881-0057