🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.hp.hpux
2 messages
2 total messages Started by Patrick Coghlan Mon, 21 Feb 1994 14:29
Softbench/C++ 'text file busy' erase error
#76
Author: Patrick Coghlan
Date: Mon, 21 Feb 1994 14:29
11 lines
1421 bytes
We are running Softbench with the HP C++ compiler under HP-UX 9.0.

Occasionally, when we try to rebuild the executable we get a
'cant erase - text file busy' which means that a copy of the executable
is still running.  The problem is, where?  There doesn't seem to be
a process running, at least ps -ef does not show any process running
the executable.  Note that we are running the debugger but encounter
this problem even after quitting from the debugger.

Might there be a child process still running around?  If so, under
what name?  Has anyone encountered this problem?
Re: Softbench/C++ 'text file busy' erase error
#77
Author: Karl Klashinsky
Date: Tue, 22 Feb 1994 14:55
27 lines
2068 bytes
The executable may not be running on your host, it might be running on
another host in your cluster.  You're going to have to do a "ps -ef"
on every host on your cluster.  Yech.

A "hack" solution is to modify your Makefile to try to mv the
executable to one side, then remove it.  Of course, the problem there
is that the second time you try to do the mv, it may still fail.
Fortunately, Make and sh gives us techniques to kludge around HP's
idiosyncrasies (of which there are far too many).  Try making your
"target" line look something like this:

target: deps
	-sh -c "mv $@ $@.$$$$; rm -f $@.$$$$;"
	# You're regular cc or CC or whatever here.

What this does is have the shell attempt to mv your target to a name
of the form "target.pid", then attempt to rm target.pid.  The "-" at
the beginning of the sh line tells make to ignore the result of the
command, so failure to remove the target.pid will not abort your
compile.

This can still break, however, since pid numbers are recycled.  Should
get around your problem >90% of the time, however.
--
Karl Klashinsky                          Bell-Northern Research, Ltd.
INTERNET:  klash@bnr.ca                  Ottawa, Ont, Canada
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads