lkml.org 
[lkml]   [1996]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: behavior of overwriting running executables?
Date
From

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




\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.051 / U:7.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site