GNU nano - Bugs: bug #58343, [Wish] nano should save to a new...
You are not allowed to post comments on this tracker with your current authentication level.
bug #58343: [Wish] nano should save to a new file, then rename it to the old
Submitter: | Peter Passchier <pepa65> | ||
Submitted: | Sun 10 May 2020 10:15:23 AM UTC | ||
Severity: | 1 - Wish | Status: | Wont Fix |
Assigned to: | None | Open/Closed: | Closed |
Thu 03 Mar 2022 10:22:17 AM UTC, comment #5: |
Benno Schulenberg <bens> |
Sat 16 May 2020 08:43:57 AM UTC, comment #4: The original article was about editing a bash script while it's running (as bash keeps reading its scripts line by line). Which of course is an edge case, and stupid, but leaving the original inode out of the newly saved file means that bash can keep reading the same content it was started with, and the saved changed file is elsewhere.
|
Peter Passchier <pepa65> |
Fri 15 May 2020 03:14:22 PM UTC, comment #3: Certainly I'm interested in the context, but not in a chaotic pile of chatter. :|
|
Benno Schulenberg <bens> |
Sun 10 May 2020 04:04:35 PM UTC, comment #2: Sorry, I thought you'd be interested in the context. The problem is that a changed file is saved over the old file, while it seems that the better 'industry practice' is to save to a new file, to be more safe, as moves/renames are atomic.
|
Peter Passchier <pepa65> |
Sun 10 May 2020 03:18:25 PM UTC, comment #1: What exactly is the problem? (In other words: don't give me a URL and expect me to read all that stuff and figure out what the problem might be.)
|
Benno Schulenberg <bens> |
Sun 10 May 2020 10:15:23 AM UTC, original submission:
There is a whole thing that came up on some editors reusing the same inode (not sure about other file systems' equivalents) that the file originally was on. Salient discussion here:
|
Peter Passchier <pepa65> |
No files currently attached
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 7 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2022-03-14 | bens | Open/Closed | Open | Closed | |
2022-03-03 | bens | Status | None | Wont Fix | |
2020-05-15 | bens | Severity | 3 - Normal | 1 - Wish | |
Status | Invalid | None | |||
Summary | nano uses the same inode when saving a file | [Wish] nano should save to a new file, then rename it to the old | |||
2020-05-10 | bens | Status | None | Invalid | |
Summary | Use the same inode after saving a file | nano uses the same inode when saving a file |
Powered by Savane 3.13-d3ae.
Corresponding source code
Patches are welcome, but until then... won't fix. The issue of file truncation, however, has been made more clear in git, commit 47c11ae8, by showing an extra and clear warning.