Messages in this thread Patch in this message |  | | Subject | Re: behavior of overwriting running executables? | Date | Thu, 16 May 1996 13:20:40 PDT | From | "Marty Leisner" <> |
| |
I wanted behavior to unlink the file when linking since I have problems: 1) when I'm setuiding a program I'm working on (I normally have to rm in the makefile 2) when I'm leaving the binary running (normally a mistake). I want the link to proceed without a problem (linux reports "text file busy"
This seems correct and I don't see harm...
Comments? You want to put it in?
It in HJ Lu's 2.6.0.13 linux binutils distribution.
--- bfd/cache.c 1996/05/16 18:33:35 1.1 +++ bfd/cache.c 1996/05/16 18:34:16 @@ -286,6 +286,8 @@ else { /*open for creat */ + /* get rid of an existing file */ + unlink(abfd->filename); abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_WB); abfd->opened_once = true; } ~ ~ ~ -- marty leisner@sdsp.mc.xerox.com Member of the League for Programming Freedom
|  |