Skip to content

Navigation Menu

Sign in
Sign up

prevent hanging when renaming file - #1300

Open
sdondley wants to merge 1 commit into
RexOps:master from
sdondley:sdondley-patch-rename
Open

prevent hanging when renaming file #1300
sdondley wants to merge 1 commit into
RexOps:master from
sdondley:sdondley-patch-rename

Conversation

@sdondley

@sdondley sdondley commented Apr 16, 2020

Copy link
Copy Markdown
Contributor

For #1299

ferki commented Apr 16, 2020

Copy link
Copy Markdown
Member

I'm afraid a full fix would be more involved than forcing the operation unconditionally on a single FS interface. See my comment on the issue.

Let's discuss the desired behavior of Rex and implementation details first over there.

@ferki ferki self-assigned this Apr 19, 2020

@ferki ferki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed on IRC, the minimum approach for this would be to:

  • test for file writability in all the Rex::Interface:Fs::* modules before having a chance to hang on an interactive prompt, and raise an exception: the built-in is_writable function might help here
  • fix all potentially affected methods: at least unlink would probably be affected as well, and there might be more, like rmdir

Also let's find a way to test at least a subset of those cases. Perhaps Test::Timer might help to detect hangs? Not sure how to kill the hung call though yet.

See more details on this comment.

If you'd like to keep working on this here, please mark the PR as draft, and feel free to update it as often as you need. Ideally, the first commit would be including tests that would fail, and then the follow-up commit(s) would fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ferki ferki ferki requested changes

Requested changes must be addressed to merge this pull request.

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /