mainThe GNU Bourne-Again SHell - Support: sr #109654, Text file busy


sr #109654: Text file busy

Submitter:  J <now3d>
Submitted:  Mon 11 Mar 2019 01:26:42 PM UTC
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup

Fri 29 Mar 2019 11:40:18 AM UTC, comment #4: 

It seems like the issue might be the use of strerror() to return a generic string for ETXTBSY.

POSIX shows for execve() the text that should be displayed is more nuanced

The new process image file is a pure procedure (shared text) file that is currently open for writing by some process.

J <now3d>
Thu 21 Mar 2019 02:57:44 PM UTC, comment #3: 

I'll look at it, but I'm reluctant to circumvent system error messages here.

Chet Ramey <chet>
Group administrator
Thu 21 Mar 2019 12:01:47 PM UTC, comment #2: 

You're completely right. It is a shame the execve() in POSIX isn't ideal. We're stuck by these archaic specifications from 1983 that it returns ETXTBSY instead of EBUSY

Why not display a more appropriate error message?
1. from man "error executable file open for writing by one or more processes."
2. Or if execve sets errno ETXTBSY, change it to EBUSY so an appropriate message is  strerror() returns a clearer message.

J <now3d>
Wed 20 Mar 2019 07:47:00 PM UTC, comment #1: 

If that's the errno that execve returns, that's the error bash is going to report.

Chet Ramey <chet>
Group administrator
Mon 11 Mar 2019 01:26:42 PM UTC, original submission:  

When a binary is being updated over ssh, we see this.

me@ip:~/dir ./app -scan
-bash: ./app: Text file busy

I can see that is the [ETXTBSY]
Text file busy.

It would be better if Bash treated as [EBUSY]
Device or resource busy.

It's not text file.

GNU bash, version 4.4.19(1)-release (x86_64-pc-linux-gnu)

J <now3d>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by chet (Posted a comment)
  • -email is unavailable- added by now3d (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-20 chet StatusNone Invalid

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code