Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* Locked file problem
@ 2000-10-24  4:00 Alessandro Ipe
  2000-10-25  4:00 ` Joerg Bruehe
  2000-10-26  1:31 ` Ric Werme
  0 siblings, 2 replies; 3+ messages in thread
From: Alessandro Ipe @ 2000-10-24  4:00 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]

Hi,


I am using Tru64 v4.0F.  My problem is the following :
When I am executing a home-made program (in C, for example) and, during
its execution, I am trying to recompile it, the compiler is failing to
overwrite the old executable with the newly created one. I presume there
is a mechanism in the OS preventing this to append, like a sort of file
locking during execution... However, is it possible to permanently
disable this option ?

Thanks for the help,


Alessandro.

--

 ___________________________________________________________
|                                                           |
| Ir. Alessandro Ipe                                        |
| Dept. Observations                | Tel. +32 2 373 06 15  |
| Remote Sensing from Space         | Fax. +32 2 374 67 88  |
| Royal Meteorological Institute    |                       |
| Avenue Circulaire 3               | Email:                |
| B-1180 Brussels           Belgium | Alessandro.Ipe@oma.be |
| Web: http://remotesensing.oma.be                          |
|___________________________________________________________|





[-- Attachment #2: Type: text/html, Size: 2390 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Locked file problem
  2000-10-24  4:00 Locked file problem Alessandro Ipe
@ 2000-10-25  4:00 ` Joerg Bruehe
  2000-10-26  1:31 ` Ric Werme
  1 sibling, 0 replies; 3+ messages in thread
From: Joerg Bruehe @ 2000-10-25  4:00 UTC (permalink / raw)


Hi Alessandro ! 

Alessandro Ipe wrote:
> 
> [...] 
> When I am executing a home-made program (in C, for example) and, during its execution, I am trying
> to recompile it, the compiler is failing to overwrite the old executable with the newly created
> one. I presume there is a mechanism in the OS preventing this to append, like a sort of file
> locking during execution... However, is it possible to permanently disable this option ?

This is a general Unix feature. 
AFAIK, the reason is that the OS will fetch code pages for the running 
process from the program file, so that file must not be changed 
while the process is running. 

If you really want to produce a new executable while the old one 
is still running, you should rename the program file. 
You might also delete it (= still on disk, but not reachable by name). 

HTH, 
Joerg Bruehe 

-- 
Joerg Bruehe, SQL Datenbanksysteme GmbH, Berlin, Germany
     (speaking only for himself)
mailto: joerg@sql.de



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Locked file problem
  2000-10-24  4:00 Locked file problem Alessandro Ipe
  2000-10-25  4:00 ` Joerg Bruehe
@ 2000-10-26  1:31 ` Ric Werme
  1 sibling, 0 replies; 3+ messages in thread
From: Ric Werme @ 2000-10-26  1:31 UTC (permalink / raw)


Alessandro Ipe <Alessandro.Ipe@kmi-irm.oma.be> writes:

>I am using Tru64 v4.0F.  My problem is the following :
>When I am executing a home-made program (in C, for example) and, during
>its execution, I am trying to recompile it, the compiler is failing to
>overwrite the old executable with the newly created one. I presume there
>is a mechanism in the OS preventing this to append, like a sort of file
>locking during execution... However, is it possible to permanently
>disable this option ?

The usual trick is the have the Makefile delete the executable first, e.g.:

foo: foo.o
	rm -f foo
	cc -o foo foo.o

It's not too hard to link to file bar and replace foo with that if the
link was successful.

>--------------AE1B004C88A70491F2B47C06
>Content-Type: text/html; charset=us-ascii
>Content-Transfer-Encoding: 7bit

><!doctype html public "-//w3c//dtd html 4.0 transitional//en">

Please don't post HTML to USENET.  A lot of us (especially with Unix
backgrounds) don't bother to use HTML capable newsreaders.
--
Ric Werme                            | werme@nospam.mediaone.net
http://people.ne.mediaone.net/werme  |       ^^^^^^^ delete
             Vote www.harrybrowne.com for President!


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-10-26  1:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-10-24  4:00 Locked file problem Alessandro Ipe
2000-10-25  4:00 ` Joerg Bruehe
2000-10-26  1:31 ` Ric Werme

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