Setting of parent shell params?

Guys,

I have a problem with one of my rake tasks. It loads a very large yaml
file into the db, but because of the default limitation on stack size
in the Linux shell, the task craps out. Executing "ulimit -s 16384"
fixes the issue, and the task completes just fine.

What I'd like to do within my task is this (in ruby-ish pseudo):

if on_linux?
  set_stack_of_running_shell_via_ulimit 16384
end

Is there any way to do this? Can I modify the attributes of the shell
that is running me?

Thanks!
John