[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

resource limiting for shell-less processes, nologin user



Hi, 

I want to limit resources (cpu, mem) for a process started from rc.local,
hence not via a login shell.
Hence shell's ulimit is out of question.
I know that login.conf is the choice here, but the problem is that the
user
(mysql) running this process (mysql server) does not have a valid login
class
in /etc/master.passwd (it's a nologin account), as the man login.conf says
it
is required.
So, if I add in login.conf this (for example):

mysql:\
        :priority=15:\
        :cputime=2s:

after reboot, the above options are ignored.
I don't want to put them under default:\ because that would affect several
processes, isn't it ?
So is it possible to enforce resource limits on a per-process basis,
processes
not started by a shell ? How ?

I run 3.1 release, i386.