How to get process PID started by Symfony? How to get process PID started by Symfony? symfony symfony

How to get process PID started by Symfony?


Process forking

It's not unlikely for processes to spawn off their UI separately and letting the starter process end normally, i.e.

----> vlc (1488) ---> EOL       |       +--> vlc-ui (??) ---> Application

This behaviour is observable by running the application from the command line and checking whether the prompt returns almost immediately.

Hangup signal

Also note that when a parent process exits (your script), the child process may choose to also exit by listening to SIGHUP signals. If you're not doing so already, you could let your script "live" longer by adding a sleep() statement while you investigate.


Another approach that may work in some situations is doing it inversely like a script to grep parse a 'ps -A' containing the desired process (PHP e.g.) and rip off PID from the result. You don't have control on "who's who" on the result set but have control on "who's" actually running.