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

[uc] Prevent PHP request to get killed when using fclose callback (#26775) #3157

Merged
merged 1 commit into from
Jan 23, 2017

Conversation

icewind1991
Copy link
Member

  • Prevent PHP request to get killed when using fclose callback
  • Add ignore_user_abort everywhere where the time limit is set to 0

From owncloud/core#26775

For #1166

@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Jan 19, 2017
@icewind1991 icewind1991 added this to the Nextcloud 12.0 milestone Jan 19, 2017
Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

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

Tested together with #3160

@@ -1146,6 +1146,8 @@ private function basicOperation($operation, $path, $hooks = [], $extraParam = nu
$unlockLater = false;
if ($this->lockingEnabled && $operation === 'fopen' && is_resource($result)) {
$unlockLater = true;
// make sure our unlocking callback will still be called if connection is aborted
ignore_user_abort(true);
Copy link
Member

Choose a reason for hiding this comment

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

undo this later on?

Copy link
Member Author

Choose a reason for hiding this comment

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

Don't think there is a reliable way to do that, since multiple streams can be opened at the same time and there is no clean way to tell when all of them are closed

@blizzz
Copy link
Member

blizzz commented Jan 23, 2017

commit signoff missing

* Prevent PHP request to get killed when using fclose callback

* Add ignore_user_abort everywhere where the time limit is set to 0

Signed-off-by: Robin Appelman <robin@icewind.nl>
@MorrisJobke MorrisJobke merged commit 9b0c6c0 into master Jan 23, 2017
@MorrisJobke MorrisJobke deleted the fcloseafterkill branch January 23, 2017 19:51
@MorrisJobke
Copy link
Member

@karlitschek Backport for #1166?

@karlitschek
Copy link
Member

please backport

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants