Operating System - HP-UX
1826925 Members
2143 Online
109705 Solutions
New Discussion

ulimit -a inside ksh script

 
Leo The Cat
Regular Advisor

ulimit -a inside ksh script

Hi

If a run the ulimit -a command in a ksh script I've

time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 2097152
stack(kbytes) unlimited
memory(kbytes) unlimited
coredump(blocks) 2097151
nofiles(descriptors) 65535
=> Not correct

But with command line it's correct:
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) unlimited
memory(kbytes) unlimited
coredump(blocks) 2097151
nofiles(descriptors) 65535

Any idea ?

Bests Regards
Den



2 REPLIES 2
Steven Schweda
Honored Contributor

Re: ulimit -a inside ksh script

I can't see the script, I can't see which
shell you use interactively, and I can't see
your PATH, so I don't know which "ulimit"
you're using in each case. Knowing nothing,
I'd guess that "ulimit" is a shell built-in
in at least one of these situations. Or else
your PATH is different. Or both.

Something like "type ulimit", or "which
ulimit", or "whence ulimit", or similar, may
give you a clue.

"man " may also be informative.
Dennis Handly
Acclaimed Contributor

Re: ulimit -a inside ksh script

>Not correct

It looks correct to me. It seems it is the output from /usr/bin/ulimit, not the ksh builtin (which doesn't have nofiles).

>But with command line it's correct:

This isn't correct since you can't be unlimited for data & stack.