On Thursday, May 4, 2017 4:53:52 AM CEST Ondřej Surý wrote: > And output of: > > pgrep mysqld > > does it return the same pid as pidof command? > > Cheers,
It think you are right, there are 2 processes: # ps uax | egrep $(pidof /usr/sbin/mysqld|tr ' ' '|') # as root chris 6177 0.5 1.7 606652 141384 ? Sl 03:20 0:40 /usr/sbin/mysqld --defaults-file=/home/chris/.local/share/akonadi/mysql.conf --datadir=/home/chris/.local/share/akonadi/db_data/ --socket=/tmp/akonadi-chris.UBoT4r/mysql.socket mysql 11527 0.3 0.9 669628 74320 ? Ssl 05:17 0:00 /usr/sbin/mysqld When I do, as in the "prerm" script: invoke-rc.d mysql stop it stops only the mysqld of user mysql (no matter how many times) and pidof -c /usr/sbin/mysqld continues to give a positive answer. However, initially, pidof -c /usr/sbin/mysqld # (with -c, on two lines, w/o one the same line) was giving two pid. But when done after the invoke-rc.d mysql stop it gives only one pid. So it might be, that at that point, installation could keep going, instead of stopping. Also the two processes are own by different users, so they are easy to differentiate in a test. Best, Chris