GNU 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: |
Benno Schulenberg <bens> |
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.
|
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.
|
Cody A. Taylor <code_m> |
Depends on the following items: None found
Items that depend on this one: None found
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/Closed | Open | Closed | |
2015-03-20 | bens | Status | None | Wont Fix | |
Summary | stdin 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 |
Powered by Savane 3.13-758e.
Corresponding source code
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.