OpenSolaris

Printable Version Enter a New Search
Bug ID 6263069
Synopsis *sh* sysulimit() produces obscure error message ulimit: bad ulimit
State 10-Fix Delivered (Fix available in build)
Category:Subcategory shell:bourne
Keywords onnv_triage
Responsible Engineer Alexander Kaplan
Reported Against
Duplicate Of
Introduced In solaris_2.0
Commit to Fix snv_34
Fixed In snv_34
Release Fixed solaris_nevada(snv_34)
Related Bugs
Submit Date 28-April-2005
Last Update Date 27-February-2006
Description
See Comments.

 xxxxx@xxxxx.com 2005-04-28 19:18:19 GMT
Work Around
As suggested by Mike Shapiro:

*****
On Solaris 9 and earlier, you can do something like this:

$ truss -fat exec -u a.out:sysulimit sh foo

and replace "foo" with the top-level command.  This will follow all
children, give you the argv[] from each exec, and show you the calls
to sysulimit() inside of anything that is a shell.  If you want the
full args to each sysulimit() replace -u with -U and then apply
a debugger each time it stops.
******

For the small test case given in Comments:

% truss -fat exec -u a.out:sysulimit bad0.sh
22692:  execve("/usr/bin/sh", 0xFFBFF514, 0xFFBFF520)  argc = 2
22692:   argv: /bin/sh ./bad0.sh
22693:  execve("/tmp/bad.sh", 0x0003A6A4, 0x0003A6AC)  argc = 2
22693:   argv: /bin/sh /tmp/bad.sh
22693:  -> sysulimit(0x3, 0x3a730, 0x39000, 0x0)
/tmp/bad.sh: ulimit: bad ulimit
22693:  <- sysulimit() = 0
% 


 xxxxx@xxxxx.com 2005-04-28 19:18:19 GMT
Comments
N/A