Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent hanging when renaming file #1300

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sdondley
Copy link
Contributor

For #1299

@ferki
Copy link
Member

ferki commented Apr 16, 2020

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
Copy link
Member

@ferki ferki left a comment

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants