bugGNU nano - Bugs: bug #63114, when piping text to a command...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #63114: when piping text to a command fails, there is no error message

Submitter:  Benno Schulenberg <bens>
Submitted:  Tue 27 Sep 2022 02:22:25 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Fri 07 Oct 2022 07:48:09 AM UTC, comment #3: 

Fixed in git, commit 19c8cea8, by checking the exit status of both the command process and the data-sending process.  (The latter probably never fails, but... just in case.)

(There is be a small chance that a failed command process did not result in an error message from the shell, and thus, if the line before the cursor contains a colon followed by a space, nano will print the text after that as the error message, which would be majorly confusing.  I will have to experiment with that, to see if this can occur, and for that, the code has to be in the mainline.)

Benno Schulenberg <bens>
Group administrator
Tue 04 Oct 2022 02:39:23 PM UTC, comment #2: 

Proposed patch is attached.

(file #53788)

Benno Schulenberg <bens>
Group administrator
Wed 28 Sep 2022 10:07:23 AM UTC, comment #1: 

For consistent reproduction, the recipe needs a "+1":

src/nano +1 README

(The +1 can be dropped when bug #63120 has been fixed.)

Benno Schulenberg <bens>
Group administrator
Tue 27 Sep 2022 02:22:25 PM UTC, original submission:  

To see what I mean, add an 'exit(8)' at the beginning of send_data(), compile, and then run 'src/nano README'.

Then type: ^T | sed 's/o/a/g' <Enter>

Nano says: "[ Read 0 lines ]" and the buffer is now empty.  This is not right.

Expected behavior: when sending the data fails, there should be an error message and the buffer should (ideally) not change at all.  (Alternatively, the buffer may change, but there must be an error message.)

Benno Schulenberg <bens>
Group administrator

 

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (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.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-11-16 bens Open/ClosedOpen Closed
    2022-10-07 bens StatusIn Progress Fixed
    2022-10-04 bens Attached File- Added 0001-files-improve-the-error-handling-when-executing-an-e.patch, #53788
        StatusNone In Progress
    2022-09-27 bens Summarywhen piping text out to a command fails, there is no error message when piping text to a command fails, there is no error message

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code