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

Unmount improvements #507

Merged
merged 1 commit into from
Apr 10, 2018
Merged

Unmount improvements #507

merged 1 commit into from
Apr 10, 2018

Conversation

benrubson
Copy link
Contributor

Hi,

I would have liked to keep some things from #503, so, this PR :

  • better handles fork / child creation for Cygwin unmount ;
  • uses INT signal expected by WinFsp rather than default TERM.

Thank you !

Ben

@benrubson benrubson requested a review from rfjakob April 8, 2018 13:39
Copy link
Collaborator

@rfjakob rfjakob left a comment

Choose a reason for hiding this comment

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

  1. Commit message is missing
  2. Where is the typo?
  3. Code after execl makes no sense
    Otherwise ok

wait(&status);
if ((pid = fork()) == 0) {
execl("/usr/bin/pkill", "/usr/bin/pkill", "-INT", "-f", string("(^|/)encfs .*/.* ").append(mountPoint).append("?( |$)").c_str(), (char *)0);
_Exit(127);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Code after execl is never reached!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep but this is to make the child to exit if execl fails 👍

Copy link
Collaborator

Choose a reason for hiding this comment

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

Good point. But shouldn't we print an error message in that case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, improved with log messages !

@benrubson
Copy link
Contributor Author

I've just improved commit message.
Thx for your review !

@benrubson benrubson changed the title Cygwin, unmount typos Cygwin, unmount improvements Apr 8, 2018
@benrubson benrubson changed the title Cygwin, unmount improvements Unmount improvements Apr 9, 2018
Log OSX unmount system error
Better handle Cygwin unmount child
Use WinFsp expected INT signal
@benrubson benrubson merged commit df7403c into vgough:master Apr 10, 2018
@benrubson benrubson deleted the fork branch April 10, 2018 08:58
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.

None yet

2 participants