Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: richardw@tiger.xs4all.nl (Richard Westerik)
Subject: Re: Overwriting exe's crashes osf programs ? Why
Date: 1996/02/25	[thread overview]
Message-ID: <022596214534Rnf0.79b5@tiger.xs4all.nl> (raw)
In-Reply-To: 4gomj2$t3r@news.service.uci.edu

iglesias@draco.acs.uci.edu (Mike Iglesias) writes:

>In article <022396184941Rnf0.79b5@tiger.xs4all.nl>,
>Richard Westerik <richardw@tiger.xs4all.nl> wrote:
>>I disagree. It's not "just" cc or ld that can cause a situation like this.
>>A customer of ours was once badly bitten by this 'feature' of Digital 
>>Unix. He tried to restore (part of?) /usr while running the restore from 
>>a 'dxterm' under X11.

>One should use caution when restoring /usr (or files in / for that matter)
>while the system is up.  In fact, it's probably better to do it single
>user. 

Of course, I know that, but the customer didn't (he never read the 
manual). What I meant was, if it is something the system cannot handle 
(like Digital UNIX obviously cannot) it should *prevent* users from 
"accidentally" doing it. Most Unix systems on the market today either (a) 
give ETXTBSY and do not overwrite the executable OR (b) survive, replacing
the executable without apparent side-effects.

>>This can happen not only when you try to overwrite an executable with a 
>>*different* content, but also when the content is going to be exactly the 
>>same! I've seen this problem on numerous occasions. I consider it to be a 
>>bug.

>So you'd like the OS to compare what it's going to write out with
>what's already there?  Sounds slow and cpu intensive if you ask me.
>If you don't do it in the OS, you'd have to implement it in all the
>utilities that write and copy files.

No, the OS should simply disallow writing over executables that are in 
use. It is *simple* to figure out (at open() time) if a file being opened 
for writing is in use as an executable. The OS could check and give an 
error message and avoid overwriting. In that case, it wouldn't have to 
check the contents, which I agree could prove impossible or 
time-consuming.

I merely reacted to someone who stated that it would be "logical" (my 
wording) to generate "Memory fault - core dumped" by overwriting an 
executable with a different version. I agree, but wanted to stress it 
*also* happens when restoring a version with identical content.

>SunOS has the same problem with writing over executables while they are
>running.

OK, that I didn't know (we don't deal a lot with Sun at the company I work
for). Some other major vendors don't have this problem, notably AT&T, IBM,
HP and SCO.

Richard
-- 
.------------------------- Richard M.J. Westerik --------------------------.
|\@@@@\  | Private e-mail : richardw@tiger.xs4all.nl OR richardw@xs4all.nl |   
| \@@@@\ | Business e-mail: richardw@bssi.nl       CompuServe: 100120,1136 |
|  \@@@@\| World wide web : http://www.xs4all.nl/~richardw (not finished)  |
`------------------- A day not loved is a day not lived -------------------'



      reply	other threads:[~1996-02-25  5:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-02-22  5:00 Overwriting exe's crashes osf programs ? Why levine
1996-02-22  5:00 ` Thomas Graichen
1996-02-27  5:00   ` Jon Trulson
1996-02-22  5:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
1996-02-22  5:00 ` Jeffrey M. Denham
1996-02-23  5:00   ` Richard Westerik
1996-02-25  5:00     ` Mike Iglesias
1996-02-25  5:00       ` Richard Westerik [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox