|
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
|