Text file busy: Difference between revisions

From Helpful
Jump to navigation Jump to search
Tag: New redirect
Line 1: Line 1:
{{stub}}
#redirect [[https://helpful.knobs-dials.com/index.php/Some_explanation_to_some_errors_and_warnings#Text_file_busy]]
 
==Cannot create regular file: Text file busy==
During installation, compilation and such, you may see:
cannot create regular file ''filename'': Text file busy
 
 
Most likely, the file you are attempting to replace is an executable, and it is currently being run.
(You could check this with [[fuser]] or [[lsof]])
 
 
Apparently this is <tt>cp</tt> being careful, figuring this ''may'' be a bad idea.
 
You can tell it that yes, you want to replace it, by using <tt>cp -f</tt> (force).
 
 
That won't have direct effect on the running process, because of OS and filesystem semantics:
it mapped the old executable when starting, which will keep existing as a (now filenameless) inode until that file is closed (i.e. the process stops).
 
 
 
It ''could'' have indirect effects, e.g. if you replace its dynamically loaded dependencies.
 
It's up to your informed decision whether to force the copy, or not do the copy, kill the process, or whatnot.
 
==bad interpreter: Text file busy==
{{stub}}
 
Pretty much the same situation as above.
 
But often specifically when a script is currently being written to.
That is, chances are it's a script you are trying to run, you have it open an editor, saved it, and switched to trying to run it so quickly it wasn't done saving yet.
 
 
 
 
 
[[Category:Warnings and errors]]

Revision as of 18:37, 15 September 2023