From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,2bfe3ba7106e5df6 X-Google-Attributes: gidfa528,public From: Joerg Bruehe Subject: Re: Locked file problem Date: 2000/10/25 Message-ID: <39F72A24.9B446C5A@sql.de>#1/1 X-Deja-AN: 685964198 Content-Transfer-Encoding: 7bit References: <39F59DB2.BFD6660@kmi-irm.oma.be> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: news@news.sql.de X-Trace: news.sql.de 972499492 37 194.64.230.128 (25 Oct 2000 18:44:52 GMT) Organization: SQL Datenbanksysteme GmbH Mime-Version: 1.0 NNTP-Posting-Date: 25 Oct 2000 18:44:52 GMT Newsgroups: comp.unix.tru64 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 From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,2bfe3ba7106e5df6 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2000-10-25 21:34:08 PST Path: supernews.google.com!sn-xit-02!supernews.com!bignews.mediaways.net!news-fra.pop.de!newscore.gigabell.net!newsfeeds.belnet.be!news.belnet.be!newsfeed.icl.net!newsfeed.skycache.com!Cidera!cyclone-0.nyroc.rr.com!chnws02.mediaone.net!chnws05.ne.mediaone.net!24.128.8.70!typhoon.ne.mediaone.net.POSTED!not-for-mail Newsgroups: comp.unix.tru64 Subject: Re: Locked file problem References: <39F59DB2.BFD6660@kmi-irm.oma.be> From: Ric Werme X-Newsreader: NN version 6.5.0 CURRENT #119 Message-ID: Date: Thu, 26 Oct 2000 01:31:02 GMT NNTP-Posting-Host: 24.91.12.32 X-Complaints-To: abuse@mediaone.net X-Trace: typhoon.ne.mediaone.net 972523862 24.91.12.32 (Wed, 25 Oct 2000 21:31:02 EDT) NNTP-Posting-Date: Wed, 25 Oct 2000 21:31:02 EDT Organization: Road Runner Xref: supernews.google.com comp.unix.tru64:645 Alessandro Ipe 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 > 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! From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,2bfe3ba7106e5df6,start X-Google-Attributes: gidfa528,public From: Alessandro Ipe Subject: Locked file problem Date: 2000/10/24 Message-ID: <39F59DB2.BFD6660@kmi-irm.oma.be>#1/1 X-Deja-AN: 685251983 X-Accept-Language: en Content-Type: multipart/alternative; boundary="------------AE1B004C88A70491F2B47C06" X-Complaints-To: abuse@belnet.be X-Trace: naxos.belnet.be 972398007 1061 193.190.249.16 (24 Oct 2000 14:33:27 GMT) Organization: Royal Meteorological Institute of Belgium Mime-Version: 1.0 Reply-To: Alessandro.Ipe@oma.be NNTP-Posting-Date: Tue, 24 Oct 2000 14:33:27 +0000 (UTC) Newsgroups: comp.unix.tru64 --------------AE1B004C88A70491F2B47C06 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 | |___________________________________________________________| --------------AE1B004C88A70491F2B47C06 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit 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                          |
|___________________________________________________________|
 

  --------------AE1B004C88A70491F2B47C06--