httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Clary <jcl...@futurefx.com>
Subject Re: Novel way to kill Apache
Date Fri, 07 Feb 1997 07:03:54 GMT

Generaly linux gives an access violation when trying to write to a file
that is associated with a running process...  The cure is, like you say,
renaming it to something before compiling.. but the link bombs outright
otherwise.  I assumed this was normal behavior.

It also works to remove the executable, and does not seem to cause
any problems with the running process..  I always wondered why
the executable was locked.. It reminded me of dos days when people
complained of a dos bug where it would open an executable read/write
instead of read only and not release the file handle until the program
finnished..  Which caused problems with applications that tried to
alter their own code.. (self-registering software is popular on dos
and generaly writes back into the EXE at some specified offset or
where it finds a particular string of characters)

It was fixed in later releases of dos..  (I think that was 3.3 or so..
maybe 3.1.. not sure)

ohwell..


> 
> 
> HPUX is also known to do this.
> 
> > It can happen on a lot of unixes in my experience.  In fact, all the ones
> > that let you scribble into a running executable (i.e. they don't lock the
> > executables).  That includes BSD*, linux, solaris, and IRIX.  But some of
> > them probably ship with ld that unlink the old executable and create a new
> > inode for the new one, (or gnu ld does this, I don't remember). 
> > 
> > Dynix/ptx won't let you rm a running executable, you have to rename it. 
> > That's the only oddball I've ever worked with though.
> > 
> > Dean
> > 
> > On Thu, 6 Feb 1997, Ben Laurie wrote:
> > 
> > > If you build a program under Irix while it is running, it changes the code
of
> > > the running program, usually resulting in a crash! This comes as a big surprise
> > > to me, since a) no other system I use does it, and b) its clearly trivial to
> > > avoid. However, my contacts at SGI insist that this is expected and in no way
> > > a bug. So, I wonder two things: does any other Unix do this (they claim they
> > > do)? And should we have a note somewhere about it, or even change the Makefile
> > > to do something like "mv httpd httpd-" (or "rm httpd") before linking?
> > > 
> > > Cheers,
> > > 
> > > Ben.
> > > 
> > > -- 
> > > Ben Laurie                Phone: +44 (181) 994 6435  Email: ben@algroup.co.uk
> > > Freelance Consultant and  Fax:   +44 (181) 994 6472
> > > Technical Director        URL: http://www.algroup.co.uk/Apache-SSL
> > > A.L. Digital Ltd,         Apache Group member (http://www.apache.org)
> > > London, England.          Apache-SSL author
> > > 
> 
> 
> 


Mime
View raw message