[comp.unix.questions] sh: Bad ulimit with atjobs

wolf@grasp1.univ-lyon1.fr (Christophe Wolfhugel) (03/30/91)

I have a strange behavior with at on a SVR3.2: when I use at jobs
none gets executed and I have return code sh: Bad ulimit.

The /usr/lib/cron/.proto contains this ulimit: ulimit $l but I don't
know where l is taken (it seems to be the user's standard ulimit).

In /usr/spool/cron/atjobs the ulimit=100000 corresponding to my effective
limit is set. Does one know why this fails?

Please answer by email, I'll summarize for the net.

-- 
Christophe Wolfhugel (on irc: Zolf)   |  Email: wolf@grasp1.univ-lyon1.fr
INSA Lyon - Departement Informatique  |  "Take care when driving, 90% of the"
69621 Villeurbanne Cedex, France      |  "births are accidents!"

cpcahil@virtech.uucp (Conor P. Cahill) (04/01/91)

wolf@grasp1.univ-lyon1.fr (Christophe Wolfhugel) writes:

>I have a strange behavior with at on a SVR3.2: when I use at jobs
>none gets executed and I have return code sh: Bad ulimit.

This problem is cause by the fact that you changed your ulimit in 
/etc/default/login, but did not change it in /etc/conf/cf.d/stune.  
Therefore cron starts with a lower ulimit than users whom login.

When your job is run, you as a normal user, cannot increase the ulimit
beyond what cron has it set to, so you get the error.

There are two ways to fix this.

	1. do it the right way-> change /etc/conf/cf.d/stune, rebuild /unix
	   and reboot 

	2. modify /etc/rc*.d/*cron to set the ulimit before the 
	   cron process is started.

-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170