Some rcNG-scripts do not stop process


In OS FreeBSD sometimes there is a problem when the rcNG-script starts
process (process is started normally, the pid-file is created, with the
rights everything is all right), but does not wish it to stop. For
example, SpamAssassin:


# /usr/local/etc/rc.d/sa-spamd start
Starting spamd.
# ls -l /var/run/spamd/spamd.pid
-rw-r--r-- 1 root spamd 6 1 авг 08:37 spamd.pid
# /usr/local/etc/rc.d/sa-spamd stop
spamd not running? (check /var/run/spamd/spamd.pid)

The reason of a problem is notobvious, the decision is from man ps:
if the length of arguments ismore than value of a variable of a kernel kern. ps_arg_cache_limit psshows
not a full line of start of process, and only name of process insquare brackets.
Also there are cases (as in SpamAssassin) when thename of process does not coincide with a name
in a rcNG-script (avariable name).
Therefore the rcNG-script does not find out the process started by it in a conclusion ps.

The decision - to increase value of a variable of a kernel kern.ps_arg_cache_limit in sysctl.conf.


 

http://www.opennet.ru/tips/info/1067.shtml