The PID we store for the Hydroponics Service is the one of the Parent process, killing it leaves children #239
Labels
bug
Something isn't working
Drush
$Things that are PHP but run on the Terminal
External Bug
We can help!
Symfony Services
Milestone
What?
@giancarlobi @patdunlavey @aksm this code here:
strawberryfield/src/StrawberryfieldHydroponicsService.php
Lines 170 to 213 in 911f8cb
Seems to be getting the PID of the
sh
that calls the command itself, but not the child process that is started. When we kill it, we are leaving a Child behind that eventually dies but gives this errorphp-fpm "oops, unknown child exited with 0".
I think we should try with
proc_open
instead ofexec
? Or, save not only the PID of the Parent Process but also of the child one. Then when we need to kill it, we try first aSIGTERM
? If that does not kill both (parent and child) we try with the Child first, then the parent?This is not a very big deal but I would love to see those errors gone, might end generating a slow down eventually (and a lot of php-fpm processes) on heavy load.
The text was updated successfully, but these errors were encountered: