GNU nano - Bugs: bug #56038, nano stops reading from external...
You are not allowed to post comments on this tracker with your current authentication level.
bug #56038: nano stops reading from external command when window is resized
Submitter: | Brand Huntsman <brand> | ||
Submitted: | Sun 31 Mar 2019 01:30:07 AM UTC | ||
Severity: | 3 - Normal | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Jump to the original submission
Tue 16 Apr 2019 08:46:26 AM UTC, comment #9: |
Benno Schulenberg <bens> |
Wed 03 Apr 2019 01:18:55 PM UTC, comment #8: Fixed in git, commit 32431cdd. |
Benno Schulenberg <bens> |
Wed 03 Apr 2019 12:15:59 PM UTC, comment #7: Just for testing, I've put a napms(1500) before the sigwinch block and after the unblock, and I resize the terminal the whole time while the command is executing, but I can't make it misbehave. So I guess that, as you say, the chances of causing a SIGWINCH at an incovenient time are now exceedingly small. So I think the patch as it now is is good enough. |
Benno Schulenberg <bens> |
Tue 02 Apr 2019 09:25:39 PM UTC, comment #6: Since reading a file doesn't abort (thanks for testing), it means the child process is aborting, not the getc(). If the SIGWINCH happens any time after the unblock in read_file(), the child process could abort and the waits will display their error messages. But if the SIGWINCH happens before the block in read_file() it could abort the child process before any data has been sent. So the block should probably wrap the entire lifetime of the child process, complicating the blocking inside read_file() with a conditional global or function parameter.
|
Brand Huntsman <brand> |
Tue 02 Apr 2019 05:56:06 PM UTC, comment #5: With the sigwinch blocks in read_file(), the blocks around the wait()s appear to no longer be needed. When removing them from the patch, I cannot find any misbehavior. Okay to remove?
|
Benno Schulenberg <bens> |
Sun 31 Mar 2019 11:54:29 PM UTC, comment #4: I moved blocking inside read_file() because resizing while reading from a file would probably also abort.
|
Brand Huntsman <brand> |
Sun 31 Mar 2019 08:00:15 PM UTC, comment #3: There is a second wait below it and a read_file above it. Moving the blocks to encompass all three fixes it but the terminal doesn't update until a key is pressed, and that key doesn't enter buffer... |
Brand Huntsman <brand> |
Sun 31 Mar 2019 06:58:02 PM UTC, comment #2: The patch doesn't fix the issue. When resizing the window, the statusbar immediately shows "Read 2 lines" or such. But then, strangely, it takes about half a second before the buffer contents are actually shown. What wait is happening there? And why is the blocking not having any effect? |
Benno Schulenberg <bens> |
Sun 31 Mar 2019 06:52:24 PM UTC, comment #1: A more visual reproduction recipe is: run 'nano --ignore' and type:
|
Benno Schulenberg <bens> |
Sun 31 Mar 2019 01:30:07 AM UTC, original submission:
Execute the "sleep 30" command and then resize nano. It closes the prompt and leaves the command running in the background. Any remaining output from a real program would not be added to the buffer. And some programs will become a zombie process until nano is terminated.
|
Brand Huntsman <brand> |
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 8 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2019-04-16 | bens | Open/Closed | Open | Closed | |
2019-04-03 | bens | Status | In Progress | Fixed | |
2019-04-02 | bens | Attached File | - | Added 0001-files-block-the-resizing-signal-while-reading-from-a.patch, #46699 | |
2019-03-31 | brand | Attached File | - | Added 0001-block-SIGWINCHes-while-executing-a-command.patch, #46683 | |
2019-03-31 | bens | Summary | nano stops reading from executing command when window is resized | nano stops reading from external command when window is resized | |
2019-03-31 | bens | Status | None | In Progress | |
Assigned to | None | bens | |||
2019-03-31 | brand | Attached File | - | Added 0001-block-SIGWINCHes-while-executing-a-command.patch, #46677 |
Powered by Savane 3.13-4448.
Corresponding source code
The fix has been released in 4.1. Thanks for reporting.