Hi,

[email protected] wrote:
> > Now trying to *edit the executable file in place* might get you a
> > -ETXTBSY (Text file busy). Another kettle of fish.

The Wanderer wrote:
> I don't think I've actually seen a reference to this (signal?) code before.

It is an error code to be emitted by system calls.
See man 3 errno.

I have a script for avoiding to derail running shell scripts (which are
not protected against changes):

  echo usage : prep_edit fileaddress
  echo Renames file, copies its content to old name and unlinks renamed original
  echo Thus protecting any potentially open filedescriptors from upcoming
  echo changes of the file content. Good for active shell scripts.

It is not safe against race conditions, though. No new starts of the
fileaddress should happen while prep_edit is running (for a short
time).


Have a nice day :)

Thomas

Reply via email to