bugGNU nano - Bugs: bug #44013, reading stdin causes 'Received...

 
 

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

bug #44013: reading stdin causes 'Received SIGHUP or SIGTERM'

Submitter:  Cody A. Taylor <code_m>
Submitted:  Thu 15 Jan 2015 03:51:58 PM UTC
   
 
Severity:  3 - Normal Status:  Wont Fix
Assigned to:  None Open/Closed:  Closed

Fri 20 Mar 2015 10:52:25 AM UTC, comment #2: 

As far as I understand pipes, when you do 'echo foo | nano', you connect nano's keyboard to whatever comes through the pipe.  When the input side of the pipe terminates, it sends a SIGHUP to the other side, which will terminate nano.  So this is expected behaviour.

If you want to use nano as a pager, then you have to use 'nano -', as you have found out.  Then nano reads whatever comes through the pipe as if it were a normal file, and at EOF reconnects the keyboard to stdin.  Somehow, in the transformation of the pipe to a file, the SIGHUP gets eaten by the shell or something.

So I think this is not a bug.

Benno Schulenberg <bens>
Group administrator
Tue 17 Mar 2015 09:37:41 PM UTC, comment #1: 

I've found that if I specify stdin as file it will read fine without crashing.

Such that `svn di -r 5103:5104 | nano` does crash, and `svn di -r 5103:5104 | nano -` does not crash.

Cody A. Taylor <code_m>
Thu 15 Jan 2015 03:51:58 PM UTC, original submission:  

Nano crashed while trying to use it as a pager for a diff input.

The command I used was (n is aliased to nano):
`svn di -r 5103:5104 | n --syntax=patch --tabsize=8`

I've attached a tar.gz containing:
 1. gnu-screen hardcopy of the crash.
 2. My .nanorc
 3. Output of `nano --version`

Cody A. Taylor <code_m>

 

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

Attached Files
file #32836:  nano-stdin-crash.tar.gz added by code_m (4KiB - application/x-gzip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by code_m (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-04-25 bens Open/ClosedOpen Closed
    2015-03-20 bens StatusNone Wont Fix
        Summarystdin read caused \'Received SIGHUP or SIGTERM\'. reading stdin causes 'Received SIGHUP or SIGTERM'
    2015-01-15 code_m Attached File- Added nano-stdin-crash.tar.gz, #32836

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code