You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, leventcz! I'm reading the source code right now, and it's a great implementation! It will help us in various performance issues.
While I reading the code, I notice that you has used pnctl_signal directly in the TopCommand class, this isn't a problem in most laravel applications, but I thing it is better to use the trap() function provided but the Command class, specially for Laravel Octane purposes due to the nature of these types of applications. pnctl_signal doesn't accepts multiples handlers, so when you call the pnctl_signal function, it will replace the previous handler if it was registered, and lost the previous one. In Laravel Octane enviroment it may be dangerous in some scenarios.
Using the trap function (this function is provided by InteractsWithSignals trait, which supports "multiples handlers" for signals) will prevent this issue and allow the Laravel application to control this.
My suggest is as follows:
Best regards.
The text was updated successfully, but these errors were encountered:
Hello, leventcz! I'm reading the source code right now, and it's a great implementation! It will help us in various performance issues.
While I reading the code, I notice that you has used
pnctl_signal
directly in theTopCommand
class, this isn't a problem in most laravel applications, but I thing it is better to use thetrap()
function provided but theCommand
class, specially forLaravel Octane
purposes due to the nature of these types of applications. pnctl_signal doesn't accepts multiples handlers, so when you call the pnctl_signal function, it will replace the previous handler if it was registered, and lost the previous one. InLaravel Octane
enviroment it may be dangerous in some scenarios.Using the
trap
function (this function is provided byInteractsWithSignals
trait, which supports "multiples handlers" for signals) will prevent this issue and allow the Laravel application to control this.My suggest is as follows:
Best regards.
The text was updated successfully, but these errors were encountered: