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

[5.5] Fix release of unexpected mutex #23607

Merged
merged 1 commit into from
Mar 22, 2018

Conversation

r-takky
Copy link

@r-takky r-takky commented Mar 19, 2018

Fix to not mistakenly release mutex when pcntl_fork function is used.

The Laravel console has multiple start prevention function by mutex.

However, since register_shutdown_function is used, if you write processing that uses process fork, the locking mechanism will be released in the child process.

When creating a mutex, keeping the parent process ID and checking it when calling removeMutex prevents operation in the child process.

@taylorotwell taylorotwell merged commit f60047b into laravel:5.5 Mar 22, 2018
@r-takky r-takky deleted the bugfix/release_mutex branch March 26, 2018 01:31
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