sh and ksh ulimit -S -c bogosity

sh and ksh ulimit -S -c bogosity

Post by David W. Bar » Fri, 01 Dec 1995 04:00:00

Well, this one sure is weird.  Given a Solaris 2.4 Korn or Bourne
shell with no soft or hard limit on core dumps, first lower the soft
limit to 0.  Then try and remove the limit by setting it to 2147483647
(0x7fffffff, the value that according to <sys/resource.h> is
RLIM_INFINITY).  This should remove the limit, right?

Wrong.  The shell curtly says "ulimit: bad ulimit", and refuses to
accept that value.  In fact, ksh refuses to take anything higher than
20971519 (0x13fffff), and sh refuses anything above 4194303 (0x3fffff)!

Of course, one can always say "ulimit -S -c unlimited", but why should
perfectly acceptable (to setrlimit(2)) numbers be arbitrarily rejected
like this?

David Barts N5JRN | UW Civil Engineering, Box 352700 | Seattle, WA 98195-2700

        1900 GMT T: 52 F wind: S 11 gust 21 mph P: 1009 mbar


1. root's shell, /sbin/sh, /bin/sh and /usr/ksh

|Our users want to change the root shell to /bin/ksh.

On computers where a user who needs root access wants to use a
shell other than /sbin/sh, one option is to create another root
account with the desired shell.  For example (in the /etc/passwd
file, with corresponding entries in the /etc/shadow file):


But you do have to remember to change both root passwords when
you want to change the root password.


Unsolicited bulk or commercial email is not welcome.   
No warranty of any kind is provided with this message.

2. Rockwell Chipset modems

3. ksh and sleep

4. Problem with IP forwarding between subnets

5. ksh /

6. linux install/config $$

7. /bin/sh not honoring ulimit

8. dual boot with Win2K

9. AT complains sh:bad ulimit 3.2v4.2

10. ISC at job gives sh: bad ulimit ??

11. setrlimit (ulimit) bug? Cannot ulimit -c!

12. Execute a sh script under perl and sh: sh script; perl script?

13. Matrox Mystique ands X.