GNU nano - Bugs: bug #47659, the commit "Avoiding the loss...
You are not allowed to post comments on this tracker with your current authentication level.
bug #47659: the commit "Avoiding the loss a buffer when getcwd() fails" causes a hang on Android
Submitter: | None | ||
Submitted: | Sun 10 Apr 2016 11:47:03 PM UTC | ||
Severity: | 4 - Important | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Jump to the original submission
Fri 15 Apr 2016 11:59:57 AM UTC, comment #8: |
Benno Schulenberg <bens> |
Tue 12 Apr 2016 08:49:21 PM UTC, comment #7: Applied both patches to v2.5.3 and made a test compile and file opening works correctly again! Thanks Benno! :) |
Anonymous |
Tue 12 Apr 2016 08:06:52 PM UTC, comment #6: It took a while for it to dawn... The chdir("..") will also succeed when at the root directory -- it will loop there forever.
|
Benno Schulenberg <bens> |
Tue 12 Apr 2016 01:11:33 PM UTC, comment #5: breaking CHANGE.. sorry! |
Anonymous |
Tue 12 Apr 2016 01:09:51 PM UTC, comment #4: breaking chance=breaking chance |
Anonymous |
Tue 12 Apr 2016 01:08:01 PM UTC, comment #3: I have a short 'nano' wrapper script set up on my Android device to execute nano.bin with TERMINFO and TERM defined, so trail-good and trail-bad are both from 2.5.3 but bad has the breaking chance so it hangs.
|
Anonymous |
Tue 12 Apr 2016 08:00:43 AM UTC, comment #2: Could you figure out where it hangs? Maybe with 'strace src/nano somefile 2>TRAIL', kill nano, and attach the TRAIL file here.
|
Benno Schulenberg <bens> |
Sun 10 Apr 2016 11:51:35 PM UTC, comment #1: Oh, and I forgot to mention I also tried a build compiled from master HEAD and it was still an issue as stated.
|
Anonymous |
Sun 10 Apr 2016 11:47:03 PM UTC, original submission:
http://git.savannah.gnu.org/cgit/nano.git/commit/?id=706f01422dd5c6f12ca3d740f1bc64d20b8119c9
|
Anonymous |
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 11 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2016-06-20 | bens | Open/Closed | Open | Closed | |
2016-04-15 | bens | Status | Ready For Test | Fixed | |
2016-04-12 | bens | Attached File | - | Added 0001-files-avoid-getting-into-an-infinite-loop-by-chdir-i.patch, #36913 | |
Attached File | - | Added 0002-files-handle-systems-that-don-t-allow-NULL-as-first-.patch, #36914 | |||
Severity | 3 - Normal | 4 - Important | |||
Status | None | Ready For Test | |||
Assigned to | None | bens | |||
2016-04-12 | None | Attached File | - | Added TRAIL, #36906 | |
2016-04-12 | None | Attached File | - | Added trail-bad, #36904 | |
Attached File | - | Added trail-good, #36905 | |||
2016-04-12 | bens | Summary | Previous commit "Avoiding the loss a buffer when getcwd() fails." breaks execution on Android | the commit "Avoiding the loss a buffer when getcwd() fails" causes a hang on Android |
Powered by Savane 3.13-f8d8.
Corresponding source code
On second thought, we don't want to just skip chdir'ing back up the tree, because very likely one or two chdir("..") will bring us back into inhabited country. Also, not doing these chdirs would make nano behave differently: when the current directory is gone, it will complain that it can't write a lock file, but after editing, it will happily write the file out to the parent dir. If we don't do the chdir, we can't write out the file, which is frustrating, and trying then to invoke the file browser just produces a beep. Frustrating and annoying. So the chdir'ing has to stay. (Although writing out the file to some other dir than what the user thinks is the current dir is strange too -- when she discovers that the current dir is gone, she will likely wonder: Where did my file go?
So, modified versions of the two patches have been pushed to git,
see ff1bf88 and 6a9e2a4.