nicolas-van / multirun

A minimalist init process designed for Docker
https://nicolas-van.github.io/multirun/
MIT License
173 stars 9 forks source link

appearance in `ps` is weird #2

Closed djdevin closed 6 years ago

djdevin commented 6 years ago

Runs fine, but appearance in ps is odd:

1000100+      5  0.0  0.0   4308   612 ?        S    17:48   0:00 multirun php-fpm -F httpd -D FOREGROUND tail --retry -f /var/log/php-fpm/www-error.log                     
1000100+      6  0.0  0.9 369116 38988 ?        Ss   17:48   0:00  \_ php-fpm: master process (/etc/php-fpm.conf)                                                            
1000100+    319  0.0  1.2 375356 50468 ?        S    17:50   0:00  |   \_ php-fpm: pool www                                                                                  
1000100+      7  0.0  0.2 265052 10468 ?        S    17:48   0:00  \_ httpd -D FOREGROUND                                                                                    
1000100+     11  0.0  0.0   4344   732 ?        S    17:48   0:00  |   \_ /usr/bin/cat                                                                                       
1000100+     28  0.0  0.0   4344   728 ?        S    17:48   0:00  |   \_ /usr/bin/cat                                                                                       
1000100+     29  0.0  0.1 264784  4428 ?        S    17:48   0:00  |   \_ httpd -D FOREGROUND                                                                                
1000100+     30  0.0  0.1 1781300 7976 ?        Sl   17:48   0:00  |   \_ httpd -D FOREGROUND                                                                                
1000100+     39  0.0  0.1 1781236 7976 ?        Sl   17:48   0:00  |   \_ httpd -D FOREGROUND                                                                                
1000100+     69  0.0  0.1 929268  7976 ?        Sl   17:48   0:00  |   \_ httpd -D FOREGROUND                                                                                
1000100+    247  0.0  0.2 1781236 8220 ?        Sl   17:49   0:00  |   \_ httpd -D FOREGROUND                                                                                
1000100+      8  0.0  0.0   4364   768 ?        S    17:48   0:00  \_ tail --retry -f /var/log/php-fpm/www-error.log

The actual command was:

multirun "php-fpm -F" "httpd -D FOREGROUND" "tail --retry -f /var/log/php-fpm/www-error.log"

Very minor but just wanted to note.

nicolas-van commented 6 years ago

Seems like ps flattens the command when printing it. It's worth to know but not really related to multirun.

It could potentially be nice to override the program name to avoid having a long chain in ps but I don't think there is a portable solution to do so.